Revert "Imported Upstream version 7.44.0"
[platform/upstream/curl.git] / tests / data / test167
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP proxy
7 HTTP proxy Basic auth
8 HTTP Digest auth
9 </keywords>
10 </info>
11
12 # Server-side
13 <reply>
14 <data>
15 HTTP/1.1 401 Authorization Required swsclose\r
16 WWW-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
17 \r
18 </data>
19
20 <data1000>
21 HTTP/1.1 200 OK swsclose\r
22 Server: no
23 Content-Length: 15
24 \r
25 Nice auth sir!
26 </data1000>
27
28 <datacheck>
29 HTTP/1.1 401 Authorization Required swsclose\r
30 WWW-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
31 \r
32 HTTP/1.1 200 OK swsclose\r
33 Server: no
34 Content-Length: 15
35 \r
36 Nice auth sir!
37 </datacheck>
38 </reply>
39
40 # Client-side
41 <client>
42 <server>
43 http
44 </server>
45 <features>
46 !SSPI
47 crypto
48 </features>
49  <name>
50 HTTP with proxy-requiring-Basic to site-requiring-Digest
51  </name>
52  <command>
53 http://data.from.server.requiring.digest.hohoho.com/167 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --digest --user digest:alot
54 </command>
55 </client>
56
57 # Verify data after the test has been "shot"
58 <verify>
59 <strip>
60 ^User-Agent: curl/.*
61 </strip>
62 <protocol>
63 GET http://data.from.server.requiring.digest.hohoho.com/167 HTTP/1.1\r
64 Proxy-Authorization: Basic Zm9vOmJhcg==\r
65 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
66 Host: data.from.server.requiring.digest.hohoho.com\r
67 Accept: */*\r
68 Proxy-Connection: Keep-Alive\r
69 \r
70 GET http://data.from.server.requiring.digest.hohoho.com/167 HTTP/1.1\r
71 Proxy-Authorization: Basic Zm9vOmJhcg==\r
72 Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/167", response="13c7c02a252cbe1c46d8669898a3be26"\r
73 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
74 Host: data.from.server.requiring.digest.hohoho.com\r
75 Accept: */*\r
76 Proxy-Connection: Keep-Alive\r
77 \r
78 </protocol>
79 </verify>
80 </testcase>