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