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