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<connect> 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</connect> 23 24# this is returned first since we get no proxy-auth 25<connect1001> 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</connect1001> 32 33# This is supposed to be returned when the server gets the second 34# Authorization: NTLM line passed-in from the client 35<connect1002> 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</connect1002> 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!SSPI 95</features> 96 <name> 97HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close 98 </name> 99 <setenv> 100# we force our own host name, in order to make the test machine independent 101CURL_GETHOSTNAME=curlhost 102# we try to use the LD_PRELOAD hack, if not a debug build 103LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 104 </setenv> 105 <command> 106http://test.remote.example.com.1021:%HTTPPORT/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth --proxytunnel 107</command> 108<precheck> 109chkhostname curlhost 110</precheck> 111</client> 112 113# Verify data after the test has been "shot" 114<verify> 115<strip> 116^User-Agent: curl/.* 117</strip> 118<protocol> 119CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1 120Host: test.remote.example.com.1021:%HTTPPORT 121Proxy-Connection: Keep-Alive 122 123CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1 124Host: test.remote.example.com.1021:%HTTPPORT 125Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 126Proxy-Connection: Keep-Alive 127 128CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1 129Host: test.remote.example.com.1021:%HTTPPORT 130Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA== 131Proxy-Connection: Keep-Alive 132 133GET /path/10210002 HTTP/1.1 134User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4 135Host: test.remote.example.com.1021:%HTTPPORT 136Accept: */* 137 138</protocol> 139</verify> 140</testcase> 141