13 <!-- Alternate the order that Basic and Digest headers appear in responses to
14 ensure that the order doesn't matter. -->
16 <!-- First request has Digest auth, wrong password -->
18 HTTP/1.1 401 Need Basic or Digest auth
\r
19 Server: Microsoft-IIS/5.0
\r
20 Content-Type: text/html; charset=iso-8859-1
\r
22 WWW-Authenticate: Digest realm="testrealm", nonce="1"
\r
23 WWW-Authenticate: Basic realm="testrealm"
\r
25 This is not the real page!
29 HTTP/1.1 401 Sorry wrong password
\r
30 Server: Microsoft-IIS/5.0
\r
31 Content-Type: text/html; charset=iso-8859-1
\r
33 WWW-Authenticate: Basic realm="testrealm"
\r
34 WWW-Authenticate: Digest realm="testrealm", nonce="2"
\r
36 This is a bad password page!
39 <!-- Second request has Basic auth, right password -->
41 HTTP/1.1 200 Things are fine in server land
\r
42 Server: Microsoft-IIS/5.0
\r
43 Content-Type: text/html; charset=iso-8859-1
\r
46 Finally, this is the real page!
49 <!-- Third request has Digest auth, wrong password -->
51 HTTP/1.1 401 Need Basic or Digest auth (2)
\r
52 Server: Microsoft-IIS/5.0
\r
53 Content-Type: text/html; charset=iso-8859-1
\r
55 WWW-Authenticate: Digest realm="testrealm", nonce="3"
\r
56 WWW-Authenticate: Basic realm="testrealm"
\r
58 This is not the real page!
62 HTTP/1.1 401 Sorry wrong password (2)
\r
63 Server: Microsoft-IIS/5.0
\r
64 Content-Type: text/html; charset=iso-8859-1
\r
66 WWW-Authenticate: Basic realm="testrealm"
\r
67 WWW-Authenticate: Digest realm="testrealm", nonce="4"
\r
69 This is a bad password page!
72 <!-- Fourth request has Basic auth, wrong password -->
74 HTTP/1.1 401 Sorry wrong password (3)
\r
75 Server: Microsoft-IIS/5.0
\r
76 Content-Type: text/html; charset=iso-8859-1
\r
78 WWW-Authenticate: Digest realm="testrealm", nonce="5"
\r
79 WWW-Authenticate: Basic realm="testrealm"
\r
81 This is a bad password page!
84 <!-- Fifth request has Basic auth, right password -->
86 HTTP/1.1 200 Things are fine in server land (2)
\r
87 Server: Microsoft-IIS/5.0
\r
88 Content-Type: text/html; charset=iso-8859-1
\r
91 Finally, this is the real page!
95 HTTP/1.1 401 Need Basic or Digest auth
\r
96 Server: Microsoft-IIS/5.0
\r
97 Content-Type: text/html; charset=iso-8859-1
\r
99 WWW-Authenticate: Digest realm="testrealm", nonce="1"
\r
100 WWW-Authenticate: Basic realm="testrealm"
\r
102 HTTP/1.1 401 Sorry wrong password
\r
103 Server: Microsoft-IIS/5.0
\r
104 Content-Type: text/html; charset=iso-8859-1
\r
106 WWW-Authenticate: Basic realm="testrealm"
\r
107 WWW-Authenticate: Digest realm="testrealm", nonce="2"
\r
109 This is a bad password page!
110 HTTP/1.1 200 Things are fine in server land
\r
111 Server: Microsoft-IIS/5.0
\r
112 Content-Type: text/html; charset=iso-8859-1
\r
115 Finally, this is the real page!
116 HTTP/1.1 401 Need Basic or Digest auth (2)
\r
117 Server: Microsoft-IIS/5.0
\r
118 Content-Type: text/html; charset=iso-8859-1
\r
120 WWW-Authenticate: Digest realm="testrealm", nonce="3"
\r
121 WWW-Authenticate: Basic realm="testrealm"
\r
123 HTTP/1.1 401 Sorry wrong password (2)
\r
124 Server: Microsoft-IIS/5.0
\r
125 Content-Type: text/html; charset=iso-8859-1
\r
127 WWW-Authenticate: Basic realm="testrealm"
\r
128 WWW-Authenticate: Digest realm="testrealm", nonce="4"
\r
130 This is a bad password page!
131 HTTP/1.1 401 Sorry wrong password (3)
\r
132 Server: Microsoft-IIS/5.0
\r
133 Content-Type: text/html; charset=iso-8859-1
\r
135 WWW-Authenticate: Digest realm="testrealm", nonce="5"
\r
136 WWW-Authenticate: Basic realm="testrealm"
\r
138 This is a bad password page!
139 HTTP/1.1 200 Things are fine in server land (2)
\r
140 Server: Microsoft-IIS/5.0
\r
141 Content-Type: text/html; charset=iso-8859-1
\r
144 Finally, this is the real page!
163 HTTP authorization retry (Digest switching to Basic)
166 # we force our own host name, in order to make the test machine independent
167 CURL_GETHOSTNAME=curlhost
168 # we try to use the LD_PRELOAD hack, if not a debug build
169 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
172 http://%HOSTIP:%HTTPPORT/2026 digest basic
179 # Verify data after the test has been "shot"
185 GET /20260100 HTTP/1.1
\r
186 Host: %HOSTIP:%HTTPPORT
\r
189 GET /20260100 HTTP/1.1
\r
190 Host: %HOSTIP:%HTTPPORT
\r
191 Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20260100", response="5f992a2e761ab926256419f7c685f85b"
\r
194 GET /20260200 HTTP/1.1
\r
195 Host: %HOSTIP:%HTTPPORT
\r
196 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
\r
199 GET /20260300 HTTP/1.1
\r
200 Host: %HOSTIP:%HTTPPORT
\r
203 GET /20260300 HTTP/1.1
\r
204 Host: %HOSTIP:%HTTPPORT
\r
205 Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/20260300", response="132242e602882251929be93228c830ae"
\r
208 GET /20260400 HTTP/1.1
\r
209 Host: %HOSTIP:%HTTPPORT
\r
210 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
\r
213 GET /20260500 HTTP/1.1
\r
214 Host: %HOSTIP:%HTTPPORT
\r
215 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
\r