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