1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP CONNECT
7HTTP proxy
8HTTP proxy NTLM auth
9--proxy-anyauth
10</keywords>
11</info>
12# Server-side
13<reply>
14
15<data>
16HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
17Proxy-Authenticate: NTLM
18Content-Length: 21
19Connection: close
20
21data to discard
22</data>
23
24# this is returned first since we get no proxy-auth
25<data1001>
26HTTP/1.1 407 Authorization Required to proxy me my dear
27Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
28Content-Length: 28
29
30And you should ignore this data.
31</data1001>
32
33# This is supposed to be returned when the server gets the second
34# Authorization: NTLM line passed-in from the client
35<data1002>
36HTTP/1.1 200 Things are fine in proxy land
37Server: Microsoft-IIS/5.0
38Content-Type: text/html; charset=iso-8859-1
39
40</data1002>
41
42# this is returned when we get a GET!
43<data2>
44HTTP/1.1 200 OK
45Date: Thu, 09 Nov 2010 14:49:00 GMT
46Content-Length: 7
47Connection: close
48Content-Type: text/html
49Funny-head: yesyes
50
51daniel
52</data2>
53
54# then this is returned when we get proxy-auth
55<data1000>
56HTTP/1.1 200 OK swsbounce
57Server: no
58
59Nice proxy auth sir!
60</data1000>
61
62<datacheck>
63HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
64Proxy-Authenticate: NTLM
65Content-Length: 21
66Connection: close
67
68HTTP/1.1 407 Authorization Required to proxy me my dear
69Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
70Content-Length: 28
71
72HTTP/1.1 200 Things are fine in proxy land
73Server: Microsoft-IIS/5.0
74Content-Type: text/html; charset=iso-8859-1
75
76HTTP/1.1 200 OK
77Date: Thu, 09 Nov 2010 14:49:00 GMT
78Content-Length: 7
79Connection: close
80Content-Type: text/html
81Funny-head: yesyes
82
83daniel
84</datacheck>
85</reply>
86
87# Client-side
88<client>
89<server>
90http
91</server>
92<features>
93NTLM
94</features>
95 <name>
96HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close
97 </name>
98 <setenv>
99# we force our own host name, in order to make the test machine independent
100CURL_GETHOSTNAME=curlhost
101# we try to use the LD_PRELOAD hack, if not a debug build
102LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
103 </setenv>
104 <command>
105http://test.remote.example.com:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel
106</command>
107<precheck>
108chkhostname curlhost
109</precheck>
110</client>
111
112# Verify data after the test has been "shot"
113<verify>
114<strip>
115^User-Agent: curl/.*
116</strip>
117<protocol>
118CONNECT test.remote.example.com:1021 HTTP/1.1
119Host: test.remote.example.com:1021
120Proxy-Connection: Keep-Alive
121
122CONNECT test.remote.example.com:1021 HTTP/1.1
123Host: test.remote.example.com:1021
124Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
125Proxy-Connection: Keep-Alive
126
127CONNECT test.remote.example.com:1021 HTTP/1.1
128Host: test.remote.example.com:1021
129Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
130Proxy-Connection: Keep-Alive
131
132GET /path/10210002 HTTP/1.1
133User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
134Host: test.remote.example.com:1021
135Accept: */*
136
137</protocol>
138</verify>
139</testcase>
140