1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP Basic auth
7HTTP NTLM auth
8</keywords>
9</info>
10# Server-side
11<reply>
12
13<!-- Basic auth -->
14<data100>
15HTTP/1.1 401 Need Basic or NTLM auth
16Server: Microsoft-IIS/5.0
17Content-Type: text/html; charset=iso-8859-1
18Content-Length: 29
19WWW-Authenticate: NTLM
20WWW-Authenticate: Basic realm="testrealm"
21
22This is a bad password page!
23</data100>
24
25<!-- NTML auth -->
26<data200>
27HTTP/1.1 401 Need Basic or NTLM auth (2)
28Server: Microsoft-IIS/5.0
29Content-Type: text/html; charset=iso-8859-1
30Content-Length: 27
31WWW-Authenticate: NTLM
32WWW-Authenticate: Basic realm="testrealm"
33
34This is not the real page!
35</data200>
36
37<data1201>
38HTTP/1.1 401 NTLM intermediate (2)
39Server: Microsoft-IIS/5.0
40Content-Type: text/html; charset=iso-8859-1
41Content-Length: 33
42WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
43
44This is still not the real page!
45</data1201>
46
47<data1202>
48HTTP/1.1 200 Things are fine in server land
49Server: Microsoft-IIS/5.0
50Content-Type: text/html; charset=iso-8859-1
51Content-Length: 32
52
53Finally, this is the real page!
54</data1202>
55
56<datacheck>
57HTTP/1.1 401 Need Basic or NTLM auth
58Server: Microsoft-IIS/5.0
59Content-Type: text/html; charset=iso-8859-1
60Content-Length: 29
61WWW-Authenticate: NTLM
62WWW-Authenticate: Basic realm="testrealm"
63
64This is a bad password page!
65HTTP/1.1 401 Need Basic or NTLM auth
66Server: Microsoft-IIS/5.0
67Content-Type: text/html; charset=iso-8859-1
68Content-Length: 29
69WWW-Authenticate: NTLM
70WWW-Authenticate: Basic realm="testrealm"
71
72This is a bad password page!
73HTTP/1.1 401 NTLM intermediate (2)
74Server: Microsoft-IIS/5.0
75Content-Type: text/html; charset=iso-8859-1
76Content-Length: 33
77WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
78
79HTTP/1.1 200 Things are fine in server land
80Server: Microsoft-IIS/5.0
81Content-Type: text/html; charset=iso-8859-1
82Content-Length: 32
83
84Finally, this is the real page!
85</datacheck>
86
87</reply>
88
89# Client-side
90<client>
91<features>
92NTLM
93!SSPI
94</features>
95<server>
96http
97</server>
98<tool>
99libntlmconnect
100</tool>
101
102 <name>
103NTLM connection mapping
104 </name>
105 <setenv>
106# we force our own host name, in order to make the test machine independent
107CURL_GETHOSTNAME=curlhost
108# we try to use the LD_PRELOAD hack, if not a debug build
109LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
110 </setenv>
111 <command>
112http://%HOSTIP:%HTTPPORT/2032
113</command>
114<precheck>
115chkhostname curlhost
116</precheck>
117</client>
118
119# Verify data after the test has been "shot"
120<verify>
121<strip>
122^User-Agent:.*
123</strip>
124<protocol>
125GET /20320100 HTTP/1.1
126Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
127Host: 127.0.0.1:%HTTPPORT
128Accept: */*
129
130GET /20320100 HTTP/1.1
131Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
132Host: 127.0.0.1:%HTTPPORT
133Accept: */*
134
135GET /20320200 HTTP/1.1
136Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
137Host: 127.0.0.1:%HTTPPORT
138Accept: */*
139
140GET /20320200 HTTP/1.1
141Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
142Host: 127.0.0.1:%HTTPPORT
143Accept: */*
144
145</protocol>
146</verify>
147</testcase>
148