HTTP HTTP GET HTTP Digest auth # Server-side HTTP/1.1 401 This server needs Digest auth Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 Content-Length: 27 WWW-Authenticate: Digest realm="testrealm", nonce="1053604144" This is not the real page! HTTP/1.1 401 Sorry wrong password Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 Content-Length: 34 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" This is not the real page either! HTTP/1.1 200 Things are fine in server land Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 Content-Length: 32 Finally, this is the real page! HTTP/1.1 401 This server needs Digest auth Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 Content-Length: 27 WWW-Authenticate: Digest realm="testrealm", nonce="1053604144" HTTP/1.1 401 Sorry wrong password Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 Content-Length: 34 WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" HTTP/1.1 200 Things are fine in server land Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=iso-8859-1 Content-Length: 32 Finally, this is the real page! # Client-side http lib2023 HTTP with Digest authorization # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/10000 testuser:wrongpass testuser:testpass chkhostname curlhost # Verify data after the test has been "shot" ^User-Agent:.* GET /10001 HTTP/1.1 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 Host: %HOSTIP:%HTTPPORT Accept: */* GET /10002 HTTP/1.1 Authorization: Digest username="testuser", realm="testrealm", nonce="1053604144", uri="/2023", response="1fa368f7300baad4567c9f74c929db39" User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 Host: %HOSTIP:%HTTPPORT Accept: */* GET /10003 HTTP/1.1 Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/2023", response="b40dbd9572833da0d36ce06a9de0eb32" User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 Host: %HOSTIP:%HTTPPORT Accept: */*