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