lh | 9ed821d | 2023-04-07 01:36:19 -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 | </keywords> |
| 10 | </info> |
| 11 | |
| 12 | # Server-side |
| 13 | <reply> |
| 14 | |
| 15 | # this is returned first since we get no proxy-auth |
| 16 | <connect1001> |
| 17 | HTTP/1.0 407 Authorization Required to proxy me my dear
|
| 18 | Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 19 | Content-Length: 1033
|
| 20 |
|
| 21 | And you should ignore this data. |
| 22 | QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ |
| 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: Thu, 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.0 407 Authorization Required to proxy me my dear
|
| 56 | Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 57 | Content-Length: 1033
|
| 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: Thu, 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 | !SSPI |
| 82 | debug |
| 83 | </features> |
| 84 | <name> |
| 85 | HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407 |
| 86 | </name> |
| 87 | <setenv> |
| 88 | # we force our own host name, in order to make the test machine independent |
| 89 | CURL_GETHOSTNAME=curlhost |
| 90 | # we try to use the LD_PRELOAD hack, if not a debug build |
| 91 | LD_PRELOAD=%PWD/libtest/.libs/libhostname.so |
| 92 | </setenv> |
| 93 | <command> |
| 94 | http://test.remote.example.com.265:%HTTPPORT/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit" |
| 95 | </command> |
| 96 | <precheck> |
| 97 | chkhostname curlhost |
| 98 | </precheck> |
| 99 | </client> |
| 100 | |
| 101 | # Verify data after the test has been "shot" |
| 102 | <verify> |
| 103 | <strip> |
| 104 | ^User-Agent: curl/.* |
| 105 | </strip> |
| 106 | <protocol nonewline="yes"> |
| 107 | CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1
|
| 108 | Host: test.remote.example.com.265:%HTTPPORT
|
| 109 | Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
| 110 | Proxy-Connection: Keep-Alive
|
| 111 |
|
| 112 | CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1
|
| 113 | Host: test.remote.example.com.265:%HTTPPORT
|
| 114 | Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
|
| 115 | Proxy-Connection: Keep-Alive
|
| 116 |
|
| 117 | POST /path/2650002 HTTP/1.1
|
| 118 | User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
|
| 119 | Host: test.remote.example.com.265:%HTTPPORT
|
| 120 | Accept: */*
|
| 121 | Content-Length: 6
|
| 122 | Content-Type: application/x-www-form-urlencoded
|
| 123 |
|
| 124 | postit |
| 125 | </protocol> |
| 126 | </verify> |
| 127 | </testcase> |