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