Imported Upstream version 7.48.0
[platform/upstream/curl.git] / tests / data / test1418
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP NTLM auth
7 connection re-use
8 </keywords>
9 </info>
10 # Server-side
11 <reply>
12 <servercmd>
13 connection-monitor
14 </servercmd>
15
16 <data>
17 HTTP/1.1 401 Authentication please!\r
18 Content-Length: 20\r
19 WWW-Authenticate: Digest realm="loonie", nonce="314156592"\r
20 WWW-Authenticate: Basic\r
21 \r
22 Please auth with me
23 </data>
24
25 # This is supposed to be returned when the server gets the second
26 # Authorization: NTLM line passed-in from the client
27 <data1000>
28 HTTP/1.1 200 Things are fine in server land\r
29 Server: Microsoft-IIS/5.0\r
30 Content-Length: 4\r
31 \r
32 moo
33 </data1000>
34
35 <data1003>
36 HTTP/1.1 200 OK\r
37 Server: Another one/1.0\r
38 Content-Length: 4\r
39 \r
40 boo
41 </data1003>
42
43 # This is the first reply after the redirection
44 <data1011>
45 HTTP/1.1 200 OK\r
46 Server: Microsoft-IIS/5.0\r
47 Content-Type: text/html; charset=iso-8859-1\r
48 Content-Length: 34\r
49 \r
50 This is not the real page either!
51 </data1011>
52
53 <datacheck>
54 HTTP/1.1 401 Authentication please!\r
55 Content-Length: 20\r
56 WWW-Authenticate: Digest realm="loonie", nonce="314156592"\r
57 WWW-Authenticate: Basic\r
58 \r
59 HTTP/1.1 200 Things are fine in server land\r
60 Server: Microsoft-IIS/5.0\r
61 Content-Length: 4\r
62 \r
63 moo
64 </datacheck>
65
66 </reply>
67
68 # Client-side
69 <client>
70 <server>
71 http
72 </server>
73 <features>
74 !SSPI
75 crypto
76 </features>
77  <name>
78 HTTP with --anyauth and connection re-use
79  </name>
80  <command>
81 http://%HOSTIP:%HTTPPORT/1418 -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/14180003
82 </command>
83 </client>
84
85 # Verify data after the test has been "shot"
86 <verify>
87 <strip>
88 ^User-Agent:.*
89 </strip>
90 <protocol>
91 GET /1418 HTTP/1.1\r
92 Host: %HOSTIP:%HTTPPORT\r
93 Accept: */*\r
94 \r
95 GET /1418 HTTP/1.1\r
96 Host: %HOSTIP:%HTTPPORT\r
97 Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/1418", response="986238b7e0077754944c966f56d9bc77"\r
98 Accept: */*\r
99 \r
100 GET /14180003 HTTP/1.1\r
101 Host: %HOSTIP:%HTTPPORT\r
102 Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/14180003", response="1c6390a67bac3283a9b023402f3b3540"\r
103 Accept: */*\r
104 \r
105 [DISCONNECT]
106 </protocol>
107 </verify>
108 </testcase>