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