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