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
19 Server: Microsoft-IIS/5.0
20 Content-Type: text/html; charset=iso-8859-1
22 WWW-Authenticate: Digest realm="testrealm", nonce="1"
23 WWW-Authenticate: Basic realm="testrealm"
25 This is not the real page!
29 HTTP/1.1 401 Sorry wrong password
30 Server: Microsoft-IIS/5.0
31 Content-Type: text/html; charset=iso-8859-1
33 WWW-Authenticate: Basic realm="testrealm"
34 WWW-Authenticate: Digest realm="testrealm", nonce="2"
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
42 Server: Microsoft-IIS/5.0
43 Content-Type: text/html; charset=iso-8859-1
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)
52 Server: Microsoft-IIS/5.0
53 Content-Type: text/html; charset=iso-8859-1
55 WWW-Authenticate: Digest realm="testrealm", nonce="3"
56 WWW-Authenticate: Basic realm="testrealm"
58 This is not the real page!
62 HTTP/1.1 401 Sorry wrong password (2)
63 Server: Microsoft-IIS/5.0
64 Content-Type: text/html; charset=iso-8859-1
66 WWW-Authenticate: Basic realm="testrealm"
67 WWW-Authenticate: Digest realm="testrealm", nonce="4"
69 This is a bad password page!
72 <!-- Fourth request has Basic auth, wrong password -->
74 HTTP/1.1 401 Sorry wrong password (3)
75 Server: Microsoft-IIS/5.0
76 Content-Type: text/html; charset=iso-8859-1
78 WWW-Authenticate: Digest realm="testrealm", nonce="5"
79 WWW-Authenticate: Basic realm="testrealm"
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)
87 Server: Microsoft-IIS/5.0
88 Content-Type: text/html; charset=iso-8859-1
91 Finally, this is the real page!
95 HTTP/1.1 401 Need Basic or Digest auth
96 Server: Microsoft-IIS/5.0
97 Content-Type: text/html; charset=iso-8859-1
99 WWW-Authenticate: Digest realm="testrealm", nonce="1"
100 WWW-Authenticate: Basic realm="testrealm"
102 HTTP/1.1 401 Sorry wrong password
103 Server: Microsoft-IIS/5.0
104 Content-Type: text/html; charset=iso-8859-1
106 WWW-Authenticate: Basic realm="testrealm"
107 WWW-Authenticate: Digest realm="testrealm", nonce="2"
109 This is a bad password page!
110 HTTP/1.1 200 Things are fine in server land
111 Server: Microsoft-IIS/5.0
112 Content-Type: text/html; charset=iso-8859-1
115 Finally, this is the real page!
116 HTTP/1.1 401 Need Basic or Digest auth (2)
117 Server: Microsoft-IIS/5.0
118 Content-Type: text/html; charset=iso-8859-1
120 WWW-Authenticate: Digest realm="testrealm", nonce="3"
121 WWW-Authenticate: Basic realm="testrealm"
123 HTTP/1.1 401 Sorry wrong password (2)
124 Server: Microsoft-IIS/5.0
125 Content-Type: text/html; charset=iso-8859-1
127 WWW-Authenticate: Basic realm="testrealm"
128 WWW-Authenticate: Digest realm="testrealm", nonce="4"
130 This is a bad password page!
131 HTTP/1.1 401 Sorry wrong password (3)
132 Server: Microsoft-IIS/5.0
133 Content-Type: text/html; charset=iso-8859-1
135 WWW-Authenticate: Digest realm="testrealm", nonce="5"
136 WWW-Authenticate: Basic realm="testrealm"
138 This is a bad password page!
139 HTTP/1.1 200 Things are fine in server land (2)
140 Server: Microsoft-IIS/5.0
141 Content-Type: text/html; charset=iso-8859-1
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
186 Host: %HOSTIP:%HTTPPORT
189 GET /20260100 HTTP/1.1
190 Host: %HOSTIP:%HTTPPORT
191 Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20260100", response="5f992a2e761ab926256419f7c685f85b"
194 GET /20260200 HTTP/1.1
195 Host: %HOSTIP:%HTTPPORT
196 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
199 GET /20260300 HTTP/1.1
200 Host: %HOSTIP:%HTTPPORT
203 GET /20260300 HTTP/1.1
204 Host: %HOSTIP:%HTTPPORT
205 Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/20260300", response="132242e602882251929be93228c830ae"
208 GET /20260400 HTTP/1.1
209 Host: %HOSTIP:%HTTPPORT
210 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
213 GET /20260500 HTTP/1.1
214 Host: %HOSTIP:%HTTPPORT
215 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=