Imported Upstream version 7.44.0
[platform/upstream/curl.git] / tests / data / test540
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\r
18 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
19 Content-Length: 33\r
20 \r
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\r
27 Content-Length: 21\r
28 Server: no\r
29 \r
30 Nice proxy auth sir!
31 </data1000>
32
33 <datacheck>
34 HTTP/1.1 407 Authorization Required to proxy me my dear\r
35 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
36 Content-Length: 33\r
37 \r
38 HTTP/1.1 200 OK\r
39 Content-Length: 21\r
40 Server: no\r
41 \r
42 Nice proxy auth sir!
43 HTTP/1.1 200 OK\r
44 Content-Length: 21\r
45 Server: no\r
46 \r
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\r
79 Host: custom.set.host.name\r
80 Accept: */*\r
81 Proxy-Connection: Keep-Alive\r
82 \r
83 GET http://test.remote.example.com/path/540 HTTP/1.1\r
84 Host: custom.set.host.name\r
85 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"\r
86 Accept: */*\r
87 Proxy-Connection: Keep-Alive\r
88 \r
89 GET http://test.remote.example.com/path/540 HTTP/1.1\r
90 Host: custom.set.host.name\r
91 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"\r
92 Accept: */*\r
93 Proxy-Connection: Keep-Alive\r
94 \r
95 </protocol>
96 </verify>
97 </testcase>