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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
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
130!SSPI
131</features>
132<server>
133http
134</server>
135 <name>
136HTTP with NTLM via --anyauth, and then follow-location with NTLM again
137 </name>
138 <setenv>
139# we force our own host name, in order to make the test machine independent
140CURL_GETHOSTNAME=curlhost
141# we try to use the LD_PRELOAD hack, if not a debug build
142LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
143 </setenv>
144 <command>
145http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L
146</command>
147<precheck>
148chkhostname curlhost
149</precheck>
150</client>
151
152# Verify data after the test has been "shot"
153<verify>
154<strip>
155^User-Agent:.*
156</strip>
157<protocol>
158GET /90 HTTP/1.1
159Host: %HOSTIP:%HTTPPORT
160Accept: */*
161
162GET /90 HTTP/1.1
163Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
164User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
165Host: %HOSTIP:%HTTPPORT
166Accept: */*
167
168GET /90 HTTP/1.1
169Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
170User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
171Host: %HOSTIP:%HTTPPORT
172Accept: */*
173
174GET /you/900010 HTTP/1.1
175Host: %HOSTIP:%HTTPPORT
176Accept: */*
177
178GET /you/900010 HTTP/1.1
179Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
180User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
181Host: %HOSTIP:%HTTPPORT
182Accept: */*
183
184GET /you/900010 HTTP/1.1
185Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
186User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
187Host: %HOSTIP:%HTTPPORT
188Accept: */*
189
190</protocol>
191</verify>
192</testcase>
193