1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP NTLM auth
7--anyauth
8followlocation
9</keywords>
10</info>
11# Server-side
12<reply>
13
14<data>
15HTTP/1.1 401 Authorization Required swsclose
16Server: Apache/1.3.27 (Darwin) PHP/4.1.2
17WWW-Authenticate: Basic
18WWW-Authenticate: Wild-and-crazy
19WWW-Authenticate: NTLM
20Content-Type: text/html; charset=iso-8859-1
21Content-Length: 26
22
23This is not the real page
24</data>
25
26# This is supposed to be returned when the server gets a first
27# Authorization: NTLM line passed-in from the client
28<data1001>
29HTTP/1.1 401 Now gimme that second request of crap
30Server: Microsoft-IIS/5.0
31Content-Type: text/html; charset=iso-8859-1
32Content-Length: 34
33WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
34
35This is not the real page either!
36</data1001>
37
38# This is supposed to be returned when the server gets the second
39# Authorization: NTLM line passed-in from the client
40<data1002>
41HTTP/1.1 301 Things are fine in server land swsclose
42Server: Microsoft-IIS/5.0
43Connection: close
44Location: /you/900010
45
46</data1002>
47
48# This is the first reply after the redirection
49<data10>
50HTTP/1.1 401 Authorization Required swsclose
51Server: Apache/1.3.27 (Darwin) PHP/4.1.2
52WWW-Authenticate: Basic
53WWW-Authenticate: Wild-and-crazy
54WWW-Authenticate: NTLM
55Content-Type: text/html; charset=iso-8859-1
56Content-Length: 26
57
58This is not the real page
59</data10>
60
61<data1011>
62HTTP/1.1 401 Now gimme that second round of crap
63Server: Microsoft-IIS/5.0
64Content-Type: text/html; charset=iso-8859-1
65Content-Length: 34
66WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
67
68This is not the real page either!
69</data1011>
70
71# This is supposed to be returned when the server gets the second
72# Authorization: NTLM line passed-in from the client
73<data1012>
74HTTP/1.1 200 Things are fine in server land swsclose
75Server: Microsoft-IIS/5.0
76Content-Type: text/html; charset=iso-8859-1
77Content-Length: 32
78
79Finally, this is the real page!
80</data1012>
81
82<datacheck>
83HTTP/1.1 401 Authorization Required swsclose
84Server: Apache/1.3.27 (Darwin) PHP/4.1.2
85WWW-Authenticate: Basic
86WWW-Authenticate: Wild-and-crazy
87WWW-Authenticate: NTLM
88Content-Type: text/html; charset=iso-8859-1
89Content-Length: 26
90
91HTTP/1.1 401 Now gimme that second request of crap
92Server: Microsoft-IIS/5.0
93Content-Type: text/html; charset=iso-8859-1
94Content-Length: 34
95WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
96
97HTTP/1.1 301 Things are fine in server land swsclose
98Server: Microsoft-IIS/5.0
99Connection: close
100Location: /you/900010
101
102HTTP/1.1 401 Authorization Required swsclose
103Server: Apache/1.3.27 (Darwin) PHP/4.1.2
104WWW-Authenticate: Basic
105WWW-Authenticate: Wild-and-crazy
106WWW-Authenticate: NTLM
107Content-Type: text/html; charset=iso-8859-1
108Content-Length: 26
109
110HTTP/1.1 401 Now gimme that second round of crap
111Server: Microsoft-IIS/5.0
112Content-Type: text/html; charset=iso-8859-1
113Content-Length: 34
114WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
115
116HTTP/1.1 200 Things are fine in server land swsclose
117Server: Microsoft-IIS/5.0
118Content-Type: text/html; charset=iso-8859-1
119Content-Length: 32
120
121Finally, this is the real page!
122</datacheck>
123
124</reply>
125
126# Client-side
127<client>
128<features>
129NTLM
130SSL
131!SSPI
132debug
133</features>
134<server>
135http
136</server>
137 <name>
138HTTP with NTLM via --anyauth, and then follow-location with NTLM again
139 </name>
140 <setenv>
141# we force our own host name, in order to make the test machine independent
142CURL_GETHOSTNAME=curlhost
143# we try to use the LD_PRELOAD hack, if not a debug build
144LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
145 </setenv>
146 <command>
147http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L
148</command>
149<precheck>
150chkhostname curlhost
151</precheck>
152</client>
153
154# Verify data after the test has been "shot"
155<verify>
156<protocol>
157GET /90 HTTP/1.1
158Host: %HOSTIP:%HTTPPORT
159User-Agent: curl/%VERSION
160Accept: */*
161
162GET /90 HTTP/1.1
163Host: %HOSTIP:%HTTPPORT
164Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
165User-Agent: curl/%VERSION
166Accept: */*
167
168GET /90 HTTP/1.1
169Host: %HOSTIP:%HTTPPORT
170Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=
171User-Agent: curl/%VERSION
172Accept: */*
173
174GET /you/900010 HTTP/1.1
175Host: %HOSTIP:%HTTPPORT
176User-Agent: curl/%VERSION
177Accept: */*
178
179GET /you/900010 HTTP/1.1
180Host: %HOSTIP:%HTTPPORT
181Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
182User-Agent: curl/%VERSION
183Accept: */*
184
185GET /you/900010 HTTP/1.1
186Host: %HOSTIP:%HTTPPORT
187Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADYzMjE3MzIxAAAAAAAAAAAAAAAAAAAAAEcJ4YHOeb5ga2TCPwDhkyUIuHjBUHcLaHRlc3R1c2VyY3VybGhvc3Q=
188User-Agent: curl/%VERSION
189Accept: */*
190
191</protocol>
192</verify>
193</testcase>
194