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