Git init
[external/curl.git] / tests / data / test90
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP NTLM auth
7 --anyauth
8 followlocation
9 </keywords>
10 </info>
11 # Server-side
12 <reply>
13
14 <data>
15 HTTP/1.1 401 Authorization Required swsclose\r
16 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
17 WWW-Authenticate: Basic\r
18 WWW-Authenticate: Wild-and-crazy\r
19 WWW-Authenticate: NTLM\r
20 Content-Type: text/html; charset=iso-8859-1\r
21 Content-Length: 26\r
22 \r
23 This 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>
29 HTTP/1.1 401 Now gimme that second request of crap\r
30 Server: Microsoft-IIS/5.0\r
31 Content-Type: text/html; charset=iso-8859-1\r
32 Content-Length: 34\r
33 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
34 \r
35 This 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>
41 HTTP/1.1 301 Things are fine in server land swsclose\r
42 Server: Microsoft-IIS/5.0\r
43 Connection: close\r
44 Location: /you/900010\r
45 \r
46 </data1002>
47
48 # This is the first reply after the redirection
49 <data10>
50 HTTP/1.1 401 Authorization Required swsclose\r
51 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
52 WWW-Authenticate: Basic\r
53 WWW-Authenticate: Wild-and-crazy\r
54 WWW-Authenticate: NTLM\r
55 Content-Type: text/html; charset=iso-8859-1\r
56 Content-Length: 26\r
57 \r
58 This is not the real page
59 </data10>
60
61 <data1011>
62 HTTP/1.1 401 Now gimme that second round of crap\r
63 Server: Microsoft-IIS/5.0\r
64 Content-Type: text/html; charset=iso-8859-1\r
65 Content-Length: 34\r
66 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
67 \r
68 This 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>
74 HTTP/1.1 200 Things are fine in server land swsclose\r
75 Server: Microsoft-IIS/5.0\r
76 Content-Type: text/html; charset=iso-8859-1\r
77 Content-Length: 32\r
78 \r
79 Finally, this is the real page!
80 </data1012>
81
82 <datacheck>
83 HTTP/1.1 401 Authorization Required swsclose\r
84 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
85 WWW-Authenticate: Basic\r
86 WWW-Authenticate: Wild-and-crazy\r
87 WWW-Authenticate: NTLM\r
88 Content-Type: text/html; charset=iso-8859-1\r
89 Content-Length: 26\r
90 \r
91 HTTP/1.1 401 Now gimme that second request of crap\r
92 Server: Microsoft-IIS/5.0\r
93 Content-Type: text/html; charset=iso-8859-1\r
94 Content-Length: 34\r
95 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
96 \r
97 HTTP/1.1 301 Things are fine in server land swsclose\r
98 Server: Microsoft-IIS/5.0\r
99 Connection: close\r
100 Location: /you/900010\r
101 \r
102 HTTP/1.1 401 Authorization Required swsclose\r
103 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
104 WWW-Authenticate: Basic\r
105 WWW-Authenticate: Wild-and-crazy\r
106 WWW-Authenticate: NTLM\r
107 Content-Type: text/html; charset=iso-8859-1\r
108 Content-Length: 26\r
109 \r
110 HTTP/1.1 401 Now gimme that second round of crap\r
111 Server: Microsoft-IIS/5.0\r
112 Content-Type: text/html; charset=iso-8859-1\r
113 Content-Length: 34\r
114 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
115 \r
116 HTTP/1.1 200 Things are fine in server land swsclose\r
117 Server: Microsoft-IIS/5.0\r
118 Content-Type: text/html; charset=iso-8859-1\r
119 Content-Length: 32\r
120 \r
121 Finally, this is the real page!
122 </datacheck>
123
124 </reply>
125
126 # Client-side
127 <client>
128 <features>
129 NTLM
130 </features>
131 <server>
132 http
133 </server>
134  <name>
135 HTTP 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
139 CURL_GETHOSTNAME=curlhost
140 # we try to use the LD_PRELOAD hack, if not a debug build
141 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
142  </setenv>
143  <command>
144 http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L
145 </command>
146 <precheck>
147 chkhostname 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>
157 GET /90 HTTP/1.1\r
158 Host: %HOSTIP:%HTTPPORT\r
159 Accept: */*\r
160 \r
161 GET /90 HTTP/1.1\r
162 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
163 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
164 Host: %HOSTIP:%HTTPPORT\r
165 Accept: */*\r
166 \r
167 GET /90 HTTP/1.1\r
168 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=\r
169 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
170 Host: %HOSTIP:%HTTPPORT\r
171 Accept: */*\r
172 \r
173 GET /you/900010 HTTP/1.1\r
174 Host: %HOSTIP:%HTTPPORT\r
175 Accept: */*\r
176 \r
177 GET /you/900010 HTTP/1.1\r
178 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
179 User-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\r
180 Host: %HOSTIP:%HTTPPORT\r
181 Accept: */*\r
182 \r
183 GET /you/900010 HTTP/1.1\r
184 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=\r
185 User-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\r
186 Host: %HOSTIP:%HTTPPORT\r
187 Accept: */*\r
188 \r
189 </protocol>
190 </verify>
191 </testcase>