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