• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
6HTTP proxy
7HTTP proxy NTLM auth
8</keywords>
9</info>
10
11# Server-side
12<reply>
13
14# this is returned first since we get no proxy-auth
15<data1001>
16HTTP/1.1 407 Authorization Required to proxy me my dear
17Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
18Content-Length: 34
19
20Hey you, authenticate or go away!
21</data1001>
22
23# This is supposed to be returned when the server gets the second
24# Authorization: NTLM line passed-in from the client
25<data1002>
26HTTP/1.1 200 Things are fine in proxy land swsclose
27Server: Microsoft-IIS/5.0
28Content-Type: text/html; charset=iso-8859-1
29Content-Length: 42
30
31Contents of that page you requested, sir.
32</data1002>
33
34<datacheck>
35HTTP/1.1 407 Authorization Required to proxy me my dear
36Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
37Content-Length: 34
38
39HTTP/1.1 200 Things are fine in proxy land swsclose
40Server: Microsoft-IIS/5.0
41Content-Type: text/html; charset=iso-8859-1
42Content-Length: 42
43
44Contents of that page you requested, sir.
45</datacheck>
46</reply>
47
48# Client-side
49<client>
50<server>
51http
52</server>
53<features>
54NTLM
55!SSPI
56debug
57proxy
58</features>
59 <name>
60HTTP proxy-auth NTLM and then POST
61 </name>
62 <setenv>
63# we force our own host name, in order to make the test machine independent
64CURL_GETHOSTNAME=curlhost
65# we try to use the LD_PRELOAD hack, if not a debug build
66LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
67 </setenv>
68 <command>
69http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm -d "postit"
70</command>
71<precheck>
72chkhostname curlhost
73</precheck>
74</client>
75
76# Verify data after the test has been "shot"
77<verify>
78<strip>
79^User-Agent: curl/.*
80</strip>
81<protocol nonewline="yes">
82POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
83Host: %HOSTIP:%HTTPPORT
84Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
85User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
86Accept: */*
87Proxy-Connection: Keep-Alive
88Content-Length: 0
89Content-Type: application/x-www-form-urlencoded
90
91POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
92Host: %HOSTIP:%HTTPPORT
93Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=
94User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
95Accept: */*
96Proxy-Connection: Keep-Alive
97Content-Length: 6
98Content-Type: application/x-www-form-urlencoded
99
100postit
101</protocol>
102</verify>
103</testcase>
104