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