lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | HTTP |
| 5 | HTTP POST |
| 6 | HTTP proxy |
| 7 | HTTP proxy NTLM auth |
| 8 | </keywords> |
| 9 | </info> |
| 10 | |
| 11 | # Server-side |
| 12 | <reply> |
| 13 | |
| 14 | # this is returned first since we get no proxy-auth |
| 15 | <data1001> |
| 16 | HTTP/1.1 407 Authorization Required to proxy me my dear
|
| 17 | Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 18 | Content-Length: 34
|
| 19 |
|
| 20 | Hey you, authenticate or go away! |
| 21 | </data1001> |
| 22 | |
| 23 | # This is supposed to be returned when the server gets the second |
| 24 | # Authorization: NTLM line passed-in from the client |
| 25 | <data1002> |
| 26 | HTTP/1.1 200 Things are fine in proxy land swsclose
|
| 27 | Server: Microsoft-IIS/5.0
|
| 28 | Content-Type: text/html; charset=iso-8859-1
|
| 29 | Content-Length: 42
|
| 30 |
|
| 31 | Contents of that page you requested, sir. |
| 32 | </data1002> |
| 33 | |
| 34 | <datacheck> |
| 35 | HTTP/1.1 407 Authorization Required to proxy me my dear
|
| 36 | Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
|
| 37 | Content-Length: 34
|
| 38 |
|
| 39 | HTTP/1.1 200 Things are fine in proxy land swsclose
|
| 40 | Server: Microsoft-IIS/5.0
|
| 41 | Content-Type: text/html; charset=iso-8859-1
|
| 42 | Content-Length: 42
|
| 43 |
|
| 44 | Contents of that page you requested, sir. |
| 45 | </datacheck> |
| 46 | </reply> |
| 47 | |
| 48 | # Client-side |
| 49 | <client> |
| 50 | <server> |
| 51 | http |
| 52 | </server> |
| 53 | <features> |
| 54 | NTLM |
| 55 | !SSPI |
| 56 | debug |
| 57 | </features> |
| 58 | <name> |
| 59 | HTTP proxy-auth NTLM and then POST |
| 60 | </name> |
| 61 | <setenv> |
| 62 | # we force our own host name, in order to make the test machine independent |
| 63 | CURL_GETHOSTNAME=curlhost |
| 64 | # we try to use the LD_PRELOAD hack, if not a debug build |
| 65 | LD_PRELOAD=%PWD/libtest/.libs/libhostname.so |
| 66 | </setenv> |
| 67 | <command> |
| 68 | http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm -d "postit" |
| 69 | </command> |
| 70 | <precheck> |
| 71 | chkhostname curlhost |
| 72 | </precheck> |
| 73 | </client> |
| 74 | |
| 75 | # Verify data after the test has been "shot" |
| 76 | <verify> |
| 77 | <strip> |
| 78 | ^User-Agent: curl/.* |
| 79 | </strip> |
| 80 | <protocol nonewline="yes"> |
| 81 | POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
|
| 82 | Host: %HOSTIP:%HTTPPORT
|
| 83 | Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
| 84 | User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
|
| 85 | Accept: */*
|
| 86 | Proxy-Connection: Keep-Alive
|
| 87 | Content-Length: 0
|
| 88 | Content-Type: application/x-www-form-urlencoded
|
| 89 |
|
| 90 | POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
|
| 91 | Host: %HOSTIP:%HTTPPORT
|
| 92 | Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
|
| 93 | User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
|
| 94 | Accept: */*
|
| 95 | Proxy-Connection: Keep-Alive
|
| 96 | Content-Length: 6
|
| 97 | Content-Type: application/x-www-form-urlencoded
|
| 98 |
|
| 99 | postit |
| 100 | </protocol> |
| 101 | </verify> |
| 102 | </testcase> |