Imported Upstream version 7.44.0
[platform/upstream/curl.git] / tests / data / test2031
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP NTLM auth
7 </keywords>
8 </info>
9 # Server-side
10 <reply>
11
12 <!-- First request has NTLM auth, wrong password -->
13 <data100>
14 HTTP/1.1 401 Need NTLM auth\r
15 Server: Microsoft-IIS/5.0\r
16 Content-Type: text/html; charset=iso-8859-1\r
17 Content-Length: 27\r
18 WWW-Authenticate: NTLM\r
19 \r
20 This is not the real page!
21 </data100>
22
23 <data1101>
24 HTTP/1.1 401 NTLM intermediate\r
25 Server: Microsoft-IIS/5.0\r
26 Content-Type: text/html; charset=iso-8859-1\r
27 Content-Length: 33\r
28 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
29 \r
30 This is still not the real page!
31 </data1101>
32
33 <data1102>
34 HTTP/1.1 401 Sorry wrong password\r
35 Server: Microsoft-IIS/5.0\r
36 Content-Type: text/html; charset=iso-8859-1\r
37 Content-Length: 29\r
38 WWW-Authenticate: NTLM\r
39 \r
40 This is a bad password page!
41 </data1102>
42
43 <!-- Second request has NTML auth, right password -->
44 <data200>
45 HTTP/1.1 401 Need NTLM auth (2)\r
46 Server: Microsoft-IIS/5.0\r
47 Content-Type: text/html; charset=iso-8859-1\r
48 Content-Length: 27\r
49 WWW-Authenticate: NTLM\r
50 \r
51 This is not the real page!
52 </data200>
53
54 <data1201>
55 HTTP/1.1 401 NTLM intermediate (2)\r
56 Server: Microsoft-IIS/5.0\r
57 Content-Type: text/html; charset=iso-8859-1\r
58 Content-Length: 33\r
59 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
60 \r
61 This is still not the real page!
62 </data1201>
63
64 <data1202>
65 HTTP/1.1 200 Things are fine in server land\r
66 Server: Microsoft-IIS/5.0\r
67 Content-Type: text/html; charset=iso-8859-1\r
68 Content-Length: 32\r
69 \r
70 Finally, this is the real page!
71 </data1202>
72
73 <!-- Third request has NTLM auth, wrong password -->
74 <data300>
75 HTTP/1.1 401 Need NTLM auth (3)\r
76 Server: Microsoft-IIS/5.0\r
77 Content-Type: text/html; charset=iso-8859-1\r
78 Content-Length: 27\r
79 WWW-Authenticate: NTLM\r
80 \r
81 This is not the real page!
82 </data300>
83
84 <data1301>
85 HTTP/1.1 401 NTLM intermediate (3)\r
86 Server: Microsoft-IIS/5.0\r
87 Content-Type: text/html; charset=iso-8859-1\r
88 Content-Length: 33\r
89 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
90 \r
91 This is still not the real page!
92 </data1301>
93
94 <data1302>
95 HTTP/1.1 401 Sorry wrong password (2)\r
96 Server: Microsoft-IIS/5.0\r
97 Content-Type: text/html; charset=iso-8859-1\r
98 Content-Length: 29\r
99 WWW-Authenticate: NTLM\r
100 \r
101 This is a bad password page!
102 </data1302>
103
104 <!-- Fourth request has NTLM auth, wrong password -->
105 <data400>
106 HTTP/1.1 401 Need NTLM auth (4)\r
107 Server: Microsoft-IIS/5.0\r
108 Content-Type: text/html; charset=iso-8859-1\r
109 Content-Length: 27\r
110 WWW-Authenticate: NTLM\r
111 \r
112 This is not the real page!
113 </data400>
114
115 <data1401>
116 HTTP/1.1 401 NTLM intermediate (4)\r
117 Server: Microsoft-IIS/5.0\r
118 Content-Type: text/html; charset=iso-8859-1\r
119 Content-Length: 33\r
120 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
121 \r
122 This is still not the real page!
123 </data1401>
124
125 <data1402>
126 HTTP/1.1 401 Sorry wrong password (3)\r
127 Server: Microsoft-IIS/5.0\r
128 Content-Type: text/html; charset=iso-8859-1\r
129 Content-Length: 29\r
130 WWW-Authenticate: NTLM\r
131 \r
132 This is a bad password page!
133 </data1402>
134
135 <!-- Fifth request has NTLM auth, right password -->
136 <data500>
137 HTTP/1.1 401 Need NTLM auth (5)\r
138 Server: Microsoft-IIS/5.0\r
139 Content-Type: text/html; charset=iso-8859-1\r
140 Content-Length: 27\r
141 WWW-Authenticate: NTLM\r
142 \r
143 This is not the real page!
144 </data500>
145
146 <data1501>
147 HTTP/1.1 401 NTLM intermediate (5)\r
148 Server: Microsoft-IIS/5.0\r
149 Content-Type: text/html; charset=iso-8859-1\r
150 Content-Length: 33\r
151 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
152 \r
153 This is still not the real page!
154 </data1501>
155
156 <data1502>
157 HTTP/1.1 200 Things are fine in server land (2)\r
158 Server: Microsoft-IIS/5.0\r
159 Content-Type: text/html; charset=iso-8859-1\r
160 Content-Length: 32\r
161 \r
162 Finally, this is the real page!
163 </data1502>
164
165 <datacheck>
166 HTTP/1.1 401 NTLM intermediate\r
167 Server: Microsoft-IIS/5.0\r
168 Content-Type: text/html; charset=iso-8859-1\r
169 Content-Length: 33\r
170 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
171 \r
172 HTTP/1.1 401 Sorry wrong password\r
173 Server: Microsoft-IIS/5.0\r
174 Content-Type: text/html; charset=iso-8859-1\r
175 Content-Length: 29\r
176 WWW-Authenticate: NTLM\r
177 \r
178 This is a bad password page!
179 HTTP/1.1 401 NTLM intermediate (2)\r
180 Server: Microsoft-IIS/5.0\r
181 Content-Type: text/html; charset=iso-8859-1\r
182 Content-Length: 33\r
183 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
184 \r
185 HTTP/1.1 200 Things are fine in server land\r
186 Server: Microsoft-IIS/5.0\r
187 Content-Type: text/html; charset=iso-8859-1\r
188 Content-Length: 32\r
189 \r
190 Finally, this is the real page!
191 HTTP/1.1 401 NTLM intermediate (3)\r
192 Server: Microsoft-IIS/5.0\r
193 Content-Type: text/html; charset=iso-8859-1\r
194 Content-Length: 33\r
195 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
196 \r
197 HTTP/1.1 401 Sorry wrong password (2)\r
198 Server: Microsoft-IIS/5.0\r
199 Content-Type: text/html; charset=iso-8859-1\r
200 Content-Length: 29\r
201 WWW-Authenticate: NTLM\r
202 \r
203 This is a bad password page!
204 HTTP/1.1 401 NTLM intermediate (4)\r
205 Server: Microsoft-IIS/5.0\r
206 Content-Type: text/html; charset=iso-8859-1\r
207 Content-Length: 33\r
208 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
209 \r
210 HTTP/1.1 401 Sorry wrong password (3)\r
211 Server: Microsoft-IIS/5.0\r
212 Content-Type: text/html; charset=iso-8859-1\r
213 Content-Length: 29\r
214 WWW-Authenticate: NTLM\r
215 \r
216 This is a bad password page!
217 HTTP/1.1 401 NTLM intermediate (5)\r
218 Server: Microsoft-IIS/5.0\r
219 Content-Type: text/html; charset=iso-8859-1\r
220 Content-Length: 33\r
221 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=\r
222 \r
223 HTTP/1.1 200 Things are fine in server land (2)\r
224 Server: Microsoft-IIS/5.0\r
225 Content-Type: text/html; charset=iso-8859-1\r
226 Content-Length: 32\r
227 \r
228 Finally, this is the real page!
229 </datacheck>
230
231 </reply>
232
233 # Client-side
234 <client>
235 <features>
236 NTLM
237 !SSPI
238 </features>
239 <server>
240 http
241 </server>
242 <tool>
243 libauthretry
244 </tool>
245
246  <name>
247 HTTP authorization retry (NTLM)
248  </name>
249  <setenv>
250 # we force our own host name, in order to make the test machine independent
251 CURL_GETHOSTNAME=curlhost
252 # we try to use the LD_PRELOAD hack, if not a debug build
253 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
254  </setenv>
255  <command>
256 http://%HOSTIP:%HTTPPORT/2031 ntlm ntlm
257 </command>
258 <precheck>
259 chkhostname curlhost
260 </precheck>
261 </client>
262
263 # Verify data after the test has been "shot"
264 <verify>
265 <strip>
266 ^User-Agent:.*
267 </strip>
268 <protocol>
269 GET /20310100 HTTP/1.1\r
270 Host: %HOSTIP:%HTTPPORT\r
271 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
272 Accept: */*\r
273 \r
274 GET /20310100 HTTP/1.1\r
275 Host: %HOSTIP:%HTTPPORT\r
276 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
277 Accept: */*\r
278 \r
279 GET /20310200 HTTP/1.1\r
280 Host: %HOSTIP:%HTTPPORT\r
281 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
282 Accept: */*\r
283 \r
284 GET /20310200 HTTP/1.1\r
285 Host: %HOSTIP:%HTTPPORT\r
286 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
287 Accept: */*\r
288 \r
289 GET /20310300 HTTP/1.1\r
290 Host: %HOSTIP:%HTTPPORT\r
291 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
292 Accept: */*\r
293 \r
294 GET /20310300 HTTP/1.1\r
295 Host: %HOSTIP:%HTTPPORT\r
296 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
297 Accept: */*\r
298 \r
299 GET /20310400 HTTP/1.1\r
300 Host: %HOSTIP:%HTTPPORT\r
301 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
302 Accept: */*\r
303 \r
304 GET /20310400 HTTP/1.1\r
305 Host: %HOSTIP:%HTTPPORT\r
306 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=\r
307 Accept: */*\r
308 \r
309 GET /20310500 HTTP/1.1\r
310 Host: %HOSTIP:%HTTPPORT\r
311 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
312 Accept: */*\r
313 \r
314 GET /20310500 HTTP/1.1\r
315 Host: %HOSTIP:%HTTPPORT\r
316 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
317 Accept: */*\r
318 \r
319 </protocol>
320 </verify>
321 </testcase>