xref: /curl/tests/data/test2050 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP CONNECT
7HTTP proxy
8proxytunnel
9CURLOPT_CONNECT_TO
10</keywords>
11</info>
12
13#
14# Server-side
15<reply>
16<connect>
17HTTP/1.1 200 Connection established
18
19</connect>
20
21<data>
22HTTP/1.1 200 OK
23Date: Tue, 09 Nov 2010 14:49:00 GMT
24Content-Length: 3
25Content-Type: text/plain
26
27OK
28</data>
29
30<datacheck>
31HTTP/1.1 200 Connection established
32
33HTTP/1.1 200 OK
34Date: Tue, 09 Nov 2010 14:49:00 GMT
35Content-Length: 3
36Content-Type: text/plain
37
38OK
39</datacheck>
40</reply>
41
42#
43# Client-side
44<client>
45<server>
46http
47http-proxy
48</server>
49<name>
50Connect to specific host via HTTP proxy (switch to tunnel mode automatically)
51</name>
52
53<command>
54http://www.example.com.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT
55</command>
56<features>
57proxy
58</features>
59</client>
60
61#
62# Verify data after the test has been "shot"
63<verify>
64<proxy>
65CONNECT connect.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
66Host: connect.example.com.%TESTNUMBER:%HTTPPORT
67User-Agent: curl/%VERSION
68Proxy-Connection: Keep-Alive
69
70</proxy>
71<protocol>
72GET /%TESTNUMBER HTTP/1.1
73Host: www.example.com.%TESTNUMBER
74User-Agent: curl/%VERSION
75Accept: */*
76
77</protocol>
78
79</verify>
80</testcase>
81