From 75d66b9c629b0d9e6c98e73e710dda87e9496cbc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 31 Mar 2004 11:51:21 +0000 Subject: test 153 tests Digest authorization and stale=true stuff --- tests/data/test153 | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 tests/data/test153 (limited to 'tests/data/test153') diff --git a/tests/data/test153 b/tests/data/test153 new file mode 100644 index 000000000..66252ca17 --- /dev/null +++ b/tests/data/test153 @@ -0,0 +1,121 @@ +# Server-side + +# reply back and ask for Digest auth + +HTTP/1.1 401 Authorization Required swsclose +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" +Content-Type: text/html; charset=iso-8859-1 + +This is not the real page + + +# This is supposed to be returned when the server gets a +# Authorization: Digest line passed-in from the client + +HTTP/1.1 200 OK +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +Content-Type: text/html; charset=iso-8859-1 +Content-Length: 23 + +This IS the real page! + + +# +# This is the second request, and this sends back a response saying that +# the request contained stale data. We want an update. Set swsbounce to +# bounce on to data1003 on the second request. + +HTTP/1.1 401 Authorization re-negotiation please swsbounce +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +WWW-Authenticate: Digest realm="testrealm", algorithm=MD5, nonce="999999", stale=true, qop="auth" +Content-Type: text/html; charset=iso-8859-1 +Content-Length: 25 + +This is not the real page + + +# The second request to the 1002 section will bounce this one back instead +# thanks to the swsbounce keyword up there + +HTTP/1.1 200 OK +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +Content-Type: text/html; charset=iso-8859-1 +Content-Length: 30 + +This IS the second real page! + + + +# Client-side + + +http + + +HTTP with Digest authorization with stale=true + + +http://%HOSTIP:%HOSTPORT/1530001 -u testuser:testpass --digest http://%HOSTIP:%HOSTPORT/1530002 + + + +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /1530001 HTTP/1.1 +Host: 127.0.0.1:8999 +Pragma: no-cache +Accept: */* + +GET /1530001 HTTP/1.1 +Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1530001", response="f4f83139396995bac665f24a1f1055c7" +User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3 +Host: 127.0.0.1:8999 +Pragma: no-cache +Accept: */* + +GET /1530002 HTTP/1.1 +Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1530002", response="f84511b014fdd0ba6494f42871079c32" +User-Agent: curl/7.11.0-CVS (i686-pc-linux-gnu) libcurl/7.11.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS +Host: 127.0.0.1:8999 +Pragma: no-cache +Accept: */* + +GET /1530002 HTTP/1.1 +Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/1530002", response="2f27c3218067948ccc8187cfe23881ee" +User-Agent: curl/7.11.0-CVS (i686-pc-linux-gnu) libcurl/7.11.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS +Host: 127.0.0.1:8999 +Pragma: no-cache +Accept: */* + + + +HTTP/1.1 401 Authorization Required swsclose +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" +Content-Type: text/html; charset=iso-8859-1 + +HTTP/1.1 200 OK +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +Content-Type: text/html; charset=iso-8859-1 +Content-Length: 23 + +This IS the real page! +HTTP/1.1 401 Authorization re-negotiation please swsbounce +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +WWW-Authenticate: Digest realm="testrealm", algorithm=MD5, nonce="999999", stale=true, qop="auth" +Content-Type: text/html; charset=iso-8859-1 +Content-Length: 25 + +HTTP/1.1 200 OK +Server: Apache/1.3.27 (Darwin) PHP/4.1.2 +Content-Type: text/html; charset=iso-8859-1 +Content-Length: 30 + +This IS the second real page! + + -- cgit v1.2.3