1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP POST
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
79</features>
80 <name>
81HTTP 1.0 proxy CONNECT auth NTLM and then POST
82 </name>
83 <setenv>
84# we force our own host name, in order to make the test machine independent
85CURL_GETHOSTNAME=curlhost
86# we try to use the LD_PRELOAD hack, if not a debug build
87LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
88 </setenv>
89 <command>
90http://test.remote.example.com.213:%HTTPPORT/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
91</command>
92<precheck>
93chkhostname curlhost
94</precheck>
95</client>
96
97# Verify data after the test has been "shot"
98<verify>
99<strip>
100^User-Agent: curl/.*
101</strip>
102<protocol nonewline="yes">
103CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0
104Host: test.remote.example.com.213:%HTTPPORT
105Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
106Proxy-Connection: Keep-Alive
107
108CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0
109Host: test.remote.example.com.213:%HTTPPORT
110Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
111Proxy-Connection: Keep-Alive
112
113POST /path/2130002 HTTP/1.1
114User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
115Host: test.remote.example.com.213:%HTTPPORT
116Accept: */*
117Content-Length: 6
118Content-Type: application/x-www-form-urlencoded
119
120postit
121</protocol>
122</verify>
123</testcase>
124