test168 (2590B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 HTTP proxy 7 HTTP proxy Digest auth 8 HTTP Digest auth 9 </keywords> 10 </info> 11 12 # Server-side 13 <reply> 14 15 # this is returned first since we get no proxy-auth 16 <data> 17 HTTP/1.1 407 Authorization Required to proxy me my dear swsclose 18 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345" 19 20 And you should ignore this data. 21 </data> 22 23 # then this is returned since we get no server-auth 24 <data1000> 25 HTTP/1.1 401 Authorization to the remote host as well swsbounce swsclose 26 WWW-Authenticate: Digest realm="realmweirdo", nonce="123456" 27 28 you should ignore this data too 29 </data1000> 30 31 <data1001> 32 HTTP/1.1 200 OK swsclose 33 Server: no 34 Content-Length: 15 35 36 Nice auth sir! 37 </data1001> 38 39 <datacheck> 40 HTTP/1.1 407 Authorization Required to proxy me my dear swsclose 41 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345" 42 43 HTTP/1.1 401 Authorization to the remote host as well swsbounce swsclose 44 WWW-Authenticate: Digest realm="realmweirdo", nonce="123456" 45 46 HTTP/1.1 200 OK swsclose 47 Server: no 48 Content-Length: 15 49 50 Nice auth sir! 51 </datacheck> 52 </reply> 53 54 # Client-side 55 <client> 56 <server> 57 http 58 </server> 59 <features> 60 !SSPI 61 crypto 62 proxy 63 digest 64 </features> 65 <name> 66 HTTP with proxy-requiring-Digest to site-requiring-Digest 67 </name> 68 <command> 69 http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-digest --digest --user digest:alot 70 </command> 71 </client> 72 73 # Verify data after the test has been "shot" 74 <verify> 75 <protocol> 76 GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1 77 Host: data.from.server.requiring.digest.hohoho.com 78 User-Agent: curl/%VERSION 79 Accept: */* 80 Proxy-Connection: Keep-Alive 81 82 GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1 83 Host: data.from.server.requiring.digest.hohoho.com 84 Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="fb8608e00ad9239a3dedb14bc8575976" 85 User-Agent: curl/%VERSION 86 Accept: */* 87 Proxy-Connection: Keep-Alive 88 89 GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1 90 Host: data.from.server.requiring.digest.hohoho.com 91 Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="fb8608e00ad9239a3dedb14bc8575976" 92 Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="ca87f2d768a231e2d637a55698d5c416" 93 User-Agent: curl/%VERSION 94 Accept: */* 95 Proxy-Connection: Keep-Alive 96 97 </protocol> 98 </verify> 99 </testcase>