1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP proxy
7HTTP proxy NTLM auth
8--proxy-anyauth
9</keywords>
10</info>
11
12# Server-side
13<reply>
14
15<data>
16HTTP/1.1 407 Authorization Required swsclose
17Server: Apache/1.3.27 (Darwin) PHP/4.1.2
18Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
19Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
20Proxy-Authenticate: NTLM
21Content-Type: text/html; charset=iso-8859-1
22Connection: close
23
24This is not the real page
25</data>
26
27# this is returned first since we get no proxy-auth
28<data1001>
29HTTP/1.1 407 Authorization Required to proxy me my dear
30Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
31Content-Length: 34
32
33Hey you, authenticate or go away!
34</data1001>
35
36# This is supposed to be returned when the server gets the second
37# Authorization: NTLM line passed-in from the client
38<data1002>
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</data1002>
46
47<datacheck>
48HTTP/1.1 407 Authorization Required swsclose
49Server: Apache/1.3.27 (Darwin) PHP/4.1.2
50Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
51Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
52Proxy-Authenticate: NTLM
53Content-Type: text/html; charset=iso-8859-1
54Connection: close
55
56HTTP/1.1 407 Authorization Required to proxy me my dear
57Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
58Content-Length: 34
59
60HTTP/1.1 200 Things are fine in proxy land swsclose
61Server: Microsoft-IIS/5.0
62Content-Type: text/html; charset=iso-8859-1
63Content-Length: 42
64
65Contents of that page you requested, sir.
66</datacheck>
67</reply>
68
69# Client-side
70<client>
71<server>
72http
73</server>
74<features>
75NTLM
76!SSPI
77</features>
78 <name>
79HTTP POST with --proxy-anyauth, picking NTLM
80 </name>
81 <setenv>
82# we force our own host name, in order to make the test machine independent
83CURL_GETHOSTNAME=curlhost
84# we try to use the LD_PRELOAD hack, if not a debug build
85LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
86 </setenv>
87 <command>
88http://%HOSTIP:%HTTPPORT/243 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth -d "postit"
89</command>
90<precheck>
91chkhostname curlhost
92</precheck>
93</client>
94
95# Verify data after the test has been "shot"
96<verify>
97<strip>
98^User-Agent: curl/.*
99</strip>
100<protocol nonewline="yes">
101POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
102User-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
103Host: %HOSTIP:%HTTPPORT
104Accept: */*
105Proxy-Connection: Keep-Alive
106Content-Length: 6
107Content-Type: application/x-www-form-urlencoded
108
109postitPOST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
110Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
111User-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
112Host: %HOSTIP:%HTTPPORT
113Accept: */*
114Proxy-Connection: Keep-Alive
115Content-Length: 0
116Content-Type: application/x-www-form-urlencoded
117
118POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
119Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
120User-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
121Host: %HOSTIP:%HTTPPORT
122Accept: */*
123Proxy-Connection: Keep-Alive
124Content-Length: 6
125Content-Type: application/x-www-form-urlencoded
126
127postit
128</protocol>
129</verify>
130</testcase>
131