1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 HTTP proxy 7 HTTP proxy Digest auth 8 multi 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 18 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345" 19 Content-Length: 33 20 21 And you should ignore this data. 22 </data> 23 24 # then this is returned when we get proxy-auth 25 <data1000> 26 HTTP/1.1 200 OK 27 Content-Length: 21 28 Server: no 29 30 Nice proxy auth sir! 31 </data1000> 32 33 <datacheck> 34 HTTP/1.1 407 Authorization Required to proxy me my dear 35 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345" 36 Content-Length: 33 37 38 HTTP/1.1 200 OK 39 Content-Length: 21 40 Server: no 41 42 Nice proxy auth sir! 43 HTTP/1.1 200 OK 44 Content-Length: 21 45 Server: no 46 47 Nice proxy auth sir! 48 </datacheck> 49 </reply> 50 51 # Client-side 52 <client> 53 <server> 54 http 55 </server> 56 # tool is what to use instead of 'curl' 57 <tool> 58 lib540 59 </tool> 60 <features> 61 !SSPI 62 crypto 63 </features> 64 <name> 65 HTTP proxy auth Digest multi API re-using connection 66 </name> 67 <command> 68 http://test.remote.example.com/path/540 http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name 69 </command> 70 </client> 71 72 # Verify data after the test has been "shot" 73 <verify> 74 <strip> 75 ^User-Agent: curl/.* 76 </strip> 77 <protocol> 78 GET http://test.remote.example.com/path/540 HTTP/1.1 79 Host: custom.set.host.name 80 Accept: */* 81 82 GET http://test.remote.example.com/path/540 HTTP/1.1 83 Host: custom.set.host.name 84 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261" 85 Accept: */* 86 87 GET http://test.remote.example.com/path/540 HTTP/1.1 88 Host: custom.set.host.name 89 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261" 90 Accept: */* 91 92 </protocol> 93 </verify> 94 </testcase> 95