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<data1001> 17HTTP/1.1 407 Authorization Required to proxy me my dear 18Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 19 20And you should ignore this data. 21</data1001> 22 23# This is supposed to be returned when the server gets the second 24# Authorization: NTLM line passed-in from the client 25<data1002> 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</data1002> 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</features> 79 <name> 80HTTP 1.0 proxy CONNECT auth NTLM and then POST 81 </name> 82 <setenv> 83# we force our own host name, in order to make the test machine independent 84CURL_GETHOSTNAME=curlhost 85# we try to use the LD_PRELOAD hack, if not a debug build 86LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 87 </setenv> 88 <command> 89http://test.remote.example.com:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit" 90</command> 91<precheck> 92chkhostname curlhost 93</precheck> 94</client> 95 96# Verify data after the test has been "shot" 97<verify> 98<strip> 99^User-Agent: curl/.* 100</strip> 101<protocol nonewline="yes"> 102CONNECT test.remote.example.com:213 HTTP/1.0 103Host: test.remote.example.com:213 104Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 105Proxy-Connection: Keep-Alive 106 107CONNECT test.remote.example.com:213 HTTP/1.0 108Host: test.remote.example.com:213 109Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q= 110Proxy-Connection: Keep-Alive 111 112POST /path/2130002 HTTP/1.1 113User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4 114Host: test.remote.example.com:213 115Accept: */* 116Content-Length: 6 117Content-Type: application/x-www-form-urlencoded 118 119postit 120</protocol> 121</verify> 122</testcase> 123