1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP GET 6HTTP CONNECT 7HTTP proxy 8HTTP proxy NTLM auth 9chunked Transfer-Encoding 10NTLM 11</keywords> 12</info> 13 14# Server-side 15<reply> 16<servercmd> 17connection-monitor 18</servercmd> 19 20# this is returned first since we get no proxy-auth 21<connect1001> 22HTTP/1.1 407 Authorization Required to proxy me my dear 23Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 24Transfer-Encoding: chunked 25 2620 27And you should ignore this data. 28FA0 29XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 300 31 32</connect1001> 33 34# This is supposed to be returned when the server gets the second 35# Authorization: NTLM line passed-in from the client 36<connect1002> 37HTTP/1.1 200 Things are fine in proxy land 38Server: Microsoft-IIS/5.0 39Content-Type: text/html; charset=iso-8859-1 40 41</connect1002> 42 43# this is returned when we get a GET! 44<data2> 45HTTP/1.1 200 OK 46Date: Tue, 09 Nov 2010 14:49:00 GMT 47Content-Length: 7 48Connection: close 49Content-Type: text/html 50Funny-head: yesyes 51 52daniel 53</data2> 54 55# then this is returned when we get proxy-auth 56<data1000> 57HTTP/1.1 200 OK swsbounce 58Server: no 59 60Nice proxy auth sir! 61</data1000> 62 63<datacheck> 64HTTP/1.1 407 Authorization Required to proxy me my dear 65Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== 66Transfer-Encoding: chunked 67 68HTTP/1.1 200 Things are fine in proxy land 69Server: Microsoft-IIS/5.0 70Content-Type: text/html; charset=iso-8859-1 71 72HTTP/1.1 200 OK 73Date: Tue, 09 Nov 2010 14:49:00 GMT 74Content-Length: 7 75Connection: close 76Content-Type: text/html 77Funny-head: yesyes 78 79daniel 80</datacheck> 81</reply> 82 83# Client-side 84<client> 85<server> 86http 87</server> 88<features> 89NTLM 90SSL 91!SSPI 92proxy 93</features> 94<name> 95HTTP proxy CONNECT auth NTLM with chunked-encoded 407 response 96</name> 97<command> 98http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel 99</command> 100</client> 101 102# Verify data after the test has been "shot" 103<verify> 104<protocol> 105CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1 106Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT 107Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 108User-Agent: curl/%VERSION 109Proxy-Connection: Keep-Alive 110 111CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1 112Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT 113Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04= 114User-Agent: curl/%VERSION 115Proxy-Connection: Keep-Alive 116 117GET /path/%TESTNUMBER0002 HTTP/1.1 118Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT 119User-Agent: curl/%VERSION 120Accept: */* 121 122[DISCONNECT] 123</protocol> 124</verify> 125</testcase> 126