Revert "Update to 7.40.1"
[platform/upstream/curl.git] / tests / data / test168
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\r
18 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
19 \r
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\r
26 WWW-Authenticate: Digest realm="realmweirdo", nonce="123456"\r
27 \r
28 you should ignore this data too
29 </data1000>
30
31 <data1001>
32 HTTP/1.1 200 OK swsclose\r
33 Server: no
34 Content-Length: 15
35 \r
36 Nice auth sir!
37 </data1001>
38
39 <datacheck>
40 HTTP/1.1 407 Authorization Required to proxy me my dear swsclose\r
41 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
42 \r
43 HTTP/1.1 401 Authorization to the remote host as well swsbounce swsclose\r
44 WWW-Authenticate: Digest realm="realmweirdo", nonce="123456"\r
45 \r
46 HTTP/1.1 200 OK swsclose\r
47 Server: no
48 Content-Length: 15
49 \r
50 Nice auth sir!
51 </datacheck>
52 </reply>
53
54 # Client-side
55 <client>
56 <server>
57 http
58 </server>
59 <features>
60 crypto
61 </features>
62  <name>
63 HTTP with proxy-requiring-Digest to site-requiring-Digest
64  </name>
65  <command>
66 http://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>
76 GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1\r
77 User-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\r
78 Host: data.from.server.requiring.digest.hohoho.com\r
79 Accept: */*\r
80 Proxy-Connection: Keep-Alive\r
81 \r
82 GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1\r
83 Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/168", response="fb8608e00ad9239a3dedb14bc8575976"\r
84 User-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\r
85 Host: data.from.server.requiring.digest.hohoho.com\r
86 Accept: */*\r
87 Proxy-Connection: Keep-Alive\r
88 \r
89 GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1\r
90 Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/168", response="fb8608e00ad9239a3dedb14bc8575976"\r
91 Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/168", response="ca87f2d768a231e2d637a55698d5c416"\r
92 User-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\r
93 Host: data.from.server.requiring.digest.hohoho.com\r
94 Accept: */*\r
95 Proxy-Connection: Keep-Alive\r
96 \r
97 </protocol>
98 </verify>
99 </testcase>