chiark / gitweb /
Import curl_7.56.1.orig.tar.gz
[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 <servercmd>
15 connection-monitor
16 </servercmd>
17
18 # this is returned first since we get no proxy-auth
19 <data>
20 HTTP/1.1 407 Authorization Required to proxy me my dear\r
21 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
22 Content-Length: 33\r
23 \r
24 And you should ignore this data.
25 </data>
26
27 # then this is returned when we get proxy-auth
28 <data1000>
29 HTTP/1.1 200 OK\r
30 Content-Length: 21\r
31 Server: no\r
32 \r
33 Nice proxy auth sir!
34 </data1000>
35
36 <datacheck>
37 HTTP/1.1 407 Authorization Required to proxy me my dear\r
38 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
39 Content-Length: 33\r
40 \r
41 HTTP/1.1 200 OK\r
42 Content-Length: 21\r
43 Server: no\r
44 \r
45 Nice proxy auth sir!
46 HTTP/1.1 407 Authorization Required to proxy me my dear\r
47 Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"\r
48 Content-Length: 33\r
49 \r
50 HTTP/1.1 200 OK\r
51 Content-Length: 21\r
52 Server: no\r
53 \r
54 Nice proxy auth sir!
55 </datacheck>
56 </reply>
57
58 # Client-side
59 <client>
60 <server>
61 http
62 </server>
63 # tool is what to use instead of 'curl'
64 <tool>
65 lib540
66 </tool>
67 <features>
68 !SSPI
69 crypto
70 </features>
71  <name>
72 HTTP proxy auth Digest multi API re-using connection
73  </name>
74  <command>
75 http://test.remote.example.com/path/540 http://%HOSTIP:%HTTPPORT silly:person custom.set.host.name
76 </command>
77 </client>
78
79 # Verify data after the test has been "shot"
80 <verify>
81 <strip>
82 ^User-Agent: curl/.*
83 </strip>
84 <protocol>
85 GET http://test.remote.example.com/path/540 HTTP/1.1\r
86 Host: custom.set.host.name\r
87 Accept: */*\r
88 Proxy-Connection: Keep-Alive\r
89 \r
90 GET http://test.remote.example.com/path/540 HTTP/1.1\r
91 Host: custom.set.host.name\r
92 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"\r
93 Accept: */*\r
94 Proxy-Connection: Keep-Alive\r
95 \r
96 GET http://test.remote.example.com/path/540 HTTP/1.1\r
97 Host: custom.set.host.name\r
98 Accept: */*\r
99 Proxy-Connection: Keep-Alive\r
100 \r
101 GET http://test.remote.example.com/path/540 HTTP/1.1\r
102 Host: custom.set.host.name\r
103 Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="/path/540", response="ca507dcf189196b6a5374d3233042261"\r
104 Accept: */*\r
105 Proxy-Connection: Keep-Alive\r
106 \r
107 [DISCONNECT]
108 </protocol>
109 </verify>
110 </testcase>