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