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