1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP CONNECT
7HTTP proxy
8proxytunnel
9HTTP proxy Digest auth
10</keywords>
11</info>
12
13# Server-side
14<reply>
15<servercmd>
16connection-monitor
17auth_required
18</servercmd>
19
20
21# this is returned first since we get no proxy-auth
22<connect>
23HTTP/1.1 407 Authorization Required to proxy me my dear
24Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
25Content-Length: 33
26
27And you should ignore this data.
28</connect>
29
30# this is returned when we get a GET!
31<data2>
32HTTP/1.1 200 OK
33Date: Thu, 09 Nov 2010 14:49:00 GMT
34Content-Length: 7
35Connection: close
36Content-Type: text/html
37Funny-head: yesyes
38
39daniel
40</data2>
41
42# then this is returned when we get proxy-auth
43<connect1000>
44HTTP/1.1 200 OK swsbounce
45Server: no
46
47</connect1000>
48
49<datacheck>
50HTTP/1.1 407 Authorization Required to proxy me my dear
51Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
52Content-Length: 33
53
54HTTP/1.1 200 OK swsbounce
55Server: no
56
57HTTP/1.1 200 OK
58Date: Thu, 09 Nov 2010 14:49:00 GMT
59Content-Length: 7
60Connection: close
61Content-Type: text/html
62Funny-head: yesyes
63
64daniel
65</datacheck>
66</reply>
67
68# Client-side
69<client>
70<server>
71http
72</server>
73<features>
74crypto
75</features>
76 <name>
77HTTP proxy CONNECT auth Digest
78 </name>
79 <command>
80http://test.remote.haxx.se.206:8990/path/2060002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-digest --proxytunnel
81</command>
82</client>
83
84# Verify data after the test has been "shot"
85<verify>
86<strip>
87^User-Agent: curl/.*
88</strip>
89<protocol>
90CONNECT test.remote.haxx.se.206:8990 HTTP/1.1
91Host: test.remote.haxx.se.206:8990
92Proxy-Connection: Keep-Alive
93
94CONNECT test.remote.haxx.se.206:8990 HTTP/1.1
95Host: test.remote.haxx.se.206:8990
96Proxy-Authorization: Digest username="silly", realm="weirdorealm", nonce="12345", uri="test.remote.haxx.se.206:8990", response="003e36decb4dbf6366b3ecb9b87c24ec"
97Proxy-Connection: Keep-Alive
98
99GET /path/2060002 HTTP/1.1
100User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
101Host: test.remote.haxx.se.206:8990
102Accept: */*
103
104[DISCONNECT]
105</protocol>
106</verify>
107</testcase>
108