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: 16 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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 28Content-Length: 28 29 3027 bytes and newline to ign 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: 16 66Connection: close 67 68HTTP/1.1 407 Authorization Required to proxy me my dear 69Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 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 94SSL 95!SSPI 96debug 97proxy 98</features> 99 <name> 100HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close 101 </name> 102 <setenv> 103# we force our own host name, in order to make the test machine independent 104CURL_GETHOSTNAME=curlhost 105# we try to use the LD_PRELOAD hack, if not a debug build 106LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 107 </setenv> 108 <command> 109http://test.remote.example.com.1021:%HTTPPORT/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth --proxytunnel 110</command> 111<precheck> 112chkhostname curlhost 113</precheck> 114</client> 115 116# Verify data after the test has been "shot" 117<verify> 118<protocol> 119CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1 120Host: test.remote.example.com.1021:%HTTPPORT 121User-Agent: curl/%VERSION 122Proxy-Connection: Keep-Alive 123 124CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1 125Host: test.remote.example.com.1021:%HTTPPORT 126Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 127User-Agent: curl/%VERSION 128Proxy-Connection: Keep-Alive 129 130CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1 131Host: test.remote.example.com.1021:%HTTPPORT 132Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q= 133User-Agent: curl/%VERSION 134Proxy-Connection: Keep-Alive 135 136GET /path/10210002 HTTP/1.1 137Host: test.remote.example.com.1021:%HTTPPORT 138User-Agent: curl/%VERSION 139Accept: */* 140 141</protocol> 142</verify> 143</testcase> 144