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 | --proxy-anyauth |
| 10 | NTLM |
| 11 | </keywords> |
| 12 | </info> |
| 13 | # Server-side |
| 14 | <reply> |
| 15 | |
| 16 | <connect> |
| 17 | HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
|
| 18 | Proxy-Authenticate: NTLM
|
| 19 | Content-Length: 16
|
| 20 | Connection: close
|
| 21 |
|
| 22 | data to discard |
| 23 | </connect> |
| 24 | |
| 25 | # this is returned first since we get no proxy-auth |
| 26 | <connect1001> |
| 27 | HTTP/1.1 407 Authorization Required to proxy me my dear
|
| 28 | Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 29 | Content-Length: 28
|
| 30 |
|
| 31 | 27 bytes and newline to ign |
| 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 swsclose
|
| 65 | Proxy-Authenticate: NTLM
|
| 66 | Content-Length: 16
|
| 67 | Connection: close
|
| 68 |
|
| 69 | HTTP/1.1 407 Authorization Required to proxy me my dear
|
| 70 | Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 71 | Content-Length: 28
|
| 72 |
|
| 73 | HTTP/1.1 200 Things are fine in proxy land
|
| 74 | Server: Microsoft-IIS/5.0
|
| 75 | Content-Type: text/html; charset=iso-8859-1
|
| 76 |
|
| 77 | HTTP/1.1 200 OK |
| 78 | Date: Tue, 09 Nov 2010 14:49:00 GMT |
| 79 | Content-Length: 7 |
| 80 | Connection: close |
| 81 | Content-Type: text/html |
| 82 | Funny-head: yesyes |
| 83 | |
| 84 | daniel |
| 85 | </datacheck> |
| 86 | </reply> |
| 87 | |
| 88 | # Client-side |
| 89 | <client> |
| 90 | <server> |
| 91 | http |
| 92 | </server> |
| 93 | <features> |
| 94 | NTLM |
| 95 | SSL |
| 96 | !SSPI |
| 97 | proxy |
| 98 | </features> |
| 99 | <name> |
| 100 | HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close |
| 101 | </name> |
| 102 | <command> |
| 103 | http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth --proxytunnel |
| 104 | </command> |
| 105 | </client> |
| 106 | |
| 107 | # Verify data after the test has been "shot" |
| 108 | <verify> |
| 109 | <protocol> |
| 110 | CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
|
| 111 | Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
|
| 112 | User-Agent: curl/%VERSION
|
| 113 | Proxy-Connection: Keep-Alive
|
| 114 |
|
| 115 | CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
|
| 116 | Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
|
| 117 | Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
| 118 | User-Agent: curl/%VERSION
|
| 119 | Proxy-Connection: Keep-Alive
|
| 120 |
|
| 121 | CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
|
| 122 | Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
|
| 123 | Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
|
| 124 | User-Agent: curl/%VERSION
|
| 125 | Proxy-Connection: Keep-Alive
|
| 126 |
|
| 127 | GET /path/%TESTNUMBER0002 HTTP/1.1
|
| 128 | Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
|
| 129 | User-Agent: curl/%VERSION
|
| 130 | Accept: */*
|
| 131 |
|
| 132 | </protocol> |
| 133 | </verify> |
| 134 | </testcase> |