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