| 1 |
<testcase> |
| 2 |
<info> |
| 3 |
<keywords> |
| 4 |
HTTP |
| 5 |
HTTP GET |
| 6 |
HTTP NTLM auth |
| 7 |
</keywords> |
| 8 |
</info> |
| 9 |
# Server-side |
| 10 |
<reply> |
| 11 |
|
| 12 |
<!-- no <data> in this test since we have NTLM from the start |
| 13 |
|
| 14 |
This is supposed to be returned when the server gets a first |
| 15 |
Authorization: NTLM line passed-in from the client --> |
| 16 |
|
| 17 |
<data1001> |
| 18 |
HTTP/1.1 401 Now gimme that second request of crap |
| 19 |
Server: Microsoft-IIS/5.0 |
| 20 |
Content-Type: text/html; charset=iso-8859-1 |
| 21 |
Content-Length: 34 |
| 22 |
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== |
| 23 |
|
| 24 |
This is not the real page either! |
| 25 |
</data1001> |
| 26 |
|
| 27 |
# This is supposed to be returned when the server gets the second |
| 28 |
# Authorization: NTLM line passed-in from the client |
| 29 |
<data1002> |
| 30 |
HTTP/1.1 200 Things are fine in server land swsclose |
| 31 |
Server: Microsoft-IIS/5.0 |
| 32 |
Content-Type: text/html; charset=iso-8859-1 |
| 33 |
Content-Length: 32 |
| 34 |
|
| 35 |
Finally, this is the real page! |
| 36 |
</data1002> |
| 37 |
|
| 38 |
<datacheck> |
| 39 |
HTTP/1.1 401 Now gimme that second request of crap |
| 40 |
Server: Microsoft-IIS/5.0 |
| 41 |
Content-Type: text/html; charset=iso-8859-1 |
| 42 |
Content-Length: 34 |
| 43 |
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA== |
| 44 |
|
| 45 |
HTTP/1.1 200 Things are fine in server land swsclose |
| 46 |
Server: Microsoft-IIS/5.0 |
| 47 |
Content-Type: text/html; charset=iso-8859-1 |
| 48 |
Content-Length: 32 |
| 49 |
|
| 50 |
Finally, this is the real page! |
| 51 |
</datacheck> |
| 52 |
|
| 53 |
</reply> |
| 54 |
|
| 55 |
# Client-side |
| 56 |
<client> |
| 57 |
<features> |
| 58 |
NTLM |
| 59 |
SSL |
| 60 |
!SSPI |
| 61 |
debug |
| 62 |
</features> |
| 63 |
<server> |
| 64 |
http |
| 65 |
</server> |
| 66 |
<name> |
| 67 |
HTTP with NTLM authorization |
| 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/67 -u testuser:testpass --ntlm |
| 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 /67 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 /67 HTTP/1.1 |
| 96 |
Host: %HOSTIP:%HTTPPORT |
| 97 |
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q= |
| 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> |