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