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