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 Basic auth, wrong password -->
18 HTTP/1.1 401 Sorry wrong password
\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 a bad password page!
28 <!-- Second request has Digest auth, right password -->
30 HTTP/1.1 200 Things are fine in server land
\r
31 Server: Microsoft-IIS/5.0
\r
32 Content-Type: text/html; charset=iso-8859-1
\r
35 Finally, this is the real page!
38 <!-- Third request has Basic auth, wrong password -->
40 HTTP/1.1 401 Sorry wrong password (2)
\r
41 Server: Microsoft-IIS/5.0
\r
42 Content-Type: text/html; charset=iso-8859-1
\r
44 WWW-Authenticate: Digest realm="testrealm", nonce="2"
\r
45 WWW-Authenticate: Basic realm="testrealm"
\r
47 This is a bad password page!
50 <!-- Fourth request has Digest auth, wrong password -->
52 HTTP/1.1 401 Sorry wrong password (3)
\r
53 Server: Microsoft-IIS/5.0
\r
54 Content-Type: text/html; charset=iso-8859-1
\r
56 WWW-Authenticate: Digest realm="testrealm", nonce="3"
\r
57 WWW-Authenticate: Basic realm="testrealm"
\r
59 This is a bad password page!
62 <!-- Fifth request has Digest auth, right password -->
64 HTTP/1.1 200 Things are fine in server land (2)
\r
65 Server: Microsoft-IIS/5.0
\r
66 Content-Type: text/html; charset=iso-8859-1
\r
69 Finally, this is the real page!
73 HTTP/1.1 401 Sorry wrong password
\r
74 Server: Microsoft-IIS/5.0
\r
75 Content-Type: text/html; charset=iso-8859-1
\r
77 WWW-Authenticate: Digest realm="testrealm", nonce="1"
\r
78 WWW-Authenticate: Basic realm="testrealm"
\r
80 This is a bad password page!
81 HTTP/1.1 200 Things are fine in server land
\r
82 Server: Microsoft-IIS/5.0
\r
83 Content-Type: text/html; charset=iso-8859-1
\r
86 Finally, this is the real page!
87 HTTP/1.1 401 Sorry wrong password (2)
\r
88 Server: Microsoft-IIS/5.0
\r
89 Content-Type: text/html; charset=iso-8859-1
\r
91 WWW-Authenticate: Digest realm="testrealm", nonce="2"
\r
92 WWW-Authenticate: Basic realm="testrealm"
\r
94 This is a bad password page!
95 HTTP/1.1 401 Sorry wrong password (3)
\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="3"
\r
100 WWW-Authenticate: Basic realm="testrealm"
\r
102 This is a bad password page!
103 HTTP/1.1 200 Things are fine in server land (2)
\r
104 Server: Microsoft-IIS/5.0
\r
105 Content-Type: text/html; charset=iso-8859-1
\r
108 Finally, this is the real page!
123 HTTP authorization retry (Basic switching to Digest)
126 # we force our own host name, in order to make the test machine independent
127 CURL_GETHOSTNAME=curlhost
128 # we try to use the LD_PRELOAD hack, if not a debug build
129 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
132 http://%HOSTIP:%HTTPPORT/2024 basic digest
139 # Verify data after the test has been "shot"
145 GET /20240100 HTTP/1.1
\r
146 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
\r
147 Host: %HOSTIP:%HTTPPORT
\r
150 GET /20240200 HTTP/1.1
\r
151 Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/20240200", response="ed646c565f79e2dd9fa37cb5a621213c"
\r
152 Host: %HOSTIP:%HTTPPORT
\r
155 GET /20240300 HTTP/1.1
\r
156 Authorization: Basic dGVzdHVzZXI6d3JvbmdwYXNz
\r
157 Host: %HOSTIP:%HTTPPORT
\r
160 GET /20240400 HTTP/1.1
\r
161 Authorization: Digest username="testuser", realm="testrealm", nonce="2", uri="/20240400", response="9741ced8caacc6124770187b36f007c5"
\r
162 Host: %HOSTIP:%HTTPPORT
\r
165 GET /20240500 HTTP/1.1
\r
166 Authorization: Digest username="testuser", realm="testrealm", nonce="3", uri="/20240500", response="5bc77ec8c2d443b27a1b55f1fd8fbb13"
\r
167 Host: %HOSTIP:%HTTPPORT
\r