1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP NTLM auth
7followlocation
8</keywords>
9</info>
10# Server-side
11<reply>
12
13<!-- no <data> in this test since we have NTLM from the start
14
15This is supposed to be returned when the server gets a first
16Authorization: NTLM line passed-in from the client -->
17
18<data1001>
19HTTP/1.1 401 Now gimme that second request of crap
20Server: Microsoft-IIS/5.0
21Content-Type: text/html; charset=iso-8859-1
22Content-Length: 34
23WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
24
25This is not the real page either!
26</data1001>
27
28# This is supposed to be returned when the server gets the second
29# Authorization: NTLM line passed-in from the client
30<data1002>
31HTTP/1.1 301 Things are fine in server land swsclose
32Server: Microsoft-IIS/5.0
33Connection: close
34Location: /you/890010
35
36</data1002>
37
38# This is the first reply after the redirection
39<data1011>
40HTTP/1.1 401 Now gimme that second round of crap
41Server: Microsoft-IIS/5.0
42Content-Type: text/html; charset=iso-8859-1
43Content-Length: 34
44WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
45
46This is not the real page either!
47</data1011>
48
49# This is supposed to be returned when the server gets the second
50# Authorization: NTLM line passed-in from the client
51<data1012>
52HTTP/1.1 200 Things are fine in server land swsclose
53Server: Microsoft-IIS/5.0
54Content-Type: text/html; charset=iso-8859-1
55Content-Length: 32
56
57Finally, this is the real page!
58</data1012>
59
60<datacheck>
61HTTP/1.1 401 Now gimme that second request of crap
62Server: Microsoft-IIS/5.0
63Content-Type: text/html; charset=iso-8859-1
64Content-Length: 34
65WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
66
67HTTP/1.1 301 Things are fine in server land swsclose
68Server: Microsoft-IIS/5.0
69Connection: close
70Location: /you/890010
71
72HTTP/1.1 401 Now gimme that second round of crap
73Server: Microsoft-IIS/5.0
74Content-Type: text/html; charset=iso-8859-1
75Content-Length: 34
76WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
77
78HTTP/1.1 200 Things are fine in server land swsclose
79Server: Microsoft-IIS/5.0
80Content-Type: text/html; charset=iso-8859-1
81Content-Length: 32
82
83Finally, this is the real page!
84</datacheck>
85
86</reply>
87
88# Client-side
89<client>
90<features>
91NTLM
92!SSPI
93debug
94</features>
95<server>
96http
97</server>
98 <name>
99HTTP with NTLM and follow-location
100 </name>
101 <setenv>
102# we force our own host name, in order to make the test machine independent
103CURL_GETHOSTNAME=curlhost
104# we try to use the LD_PRELOAD hack, if not a debug build
105LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
106 </setenv>
107 <command>
108http://%HOSTIP:%HTTPPORT/89 -u testuser:testpass --ntlm -L
109</command>
110<precheck>
111chkhostname curlhost
112</precheck>
113</client>
114
115# Verify data after the test has been "shot"
116<verify>
117<strip>
118^User-Agent:.*
119</strip>
120<protocol>
121GET /89 HTTP/1.1
122Host: %HOSTIP:%HTTPPORT
123Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
124User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
125Accept: */*
126
127GET /89 HTTP/1.1
128Host: %HOSTIP:%HTTPPORT
129Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
130User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
131Accept: */*
132
133GET /you/890010 HTTP/1.1
134Host: %HOSTIP:%HTTPPORT
135Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
136User-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
137Accept: */*
138
139GET /you/890010 HTTP/1.1
140Host: %HOSTIP:%HTTPPORT
141Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAOv8cm3wOKJ5nhWWScOgdUI2MzIxNzMyMVgNcU0f3zxHeccvitN7zHkBAQAAAAAAAACAPtXesZ0BNjMyMTczMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
142User-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
143Accept: */*
144
145</protocol>
146</verify>
147</testcase>
148