Imported Upstream version 7.48.0
[platform/upstream/curl.git] / tests / data / test1078
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP/1.0
6 HTTP GET
7 HTTP CONNECT
8 HTTP proxy
9 proxytunnel
10 </keywords>
11 </info>
12
13 #
14 # Server-side
15 <reply>
16 <connect>
17 HTTP/1.1 200 Mighty fine indeed\r
18 Server: test tunnel 2000\r
19 \r
20 </connect>
21
22 <data nocheck="yes">
23 HTTP/1.0 200 OK\r
24 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
25 Server: test-server/fake\r
26 Content-Type: text/html\r
27 Funny-head: yesyes\r
28 Content-Length: 9\r
29 Connection: keep-alive\r
30 \r
31 contents
32 </data>
33 </reply>
34
35 #
36 # Client-side
37 <client>
38 <server>
39 http
40 http-proxy
41 </server>
42  <name>
43 HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0
44  </name>
45  <command>
46 --proxy1.0 %HOSTIP:%PROXYPORT -p http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078
47 </command>
48 </client>
49
50 #
51 # Verify data after the test has been "shot"
52 <verify>
53 <strip>
54 ^User-Agent:.*
55 </strip>
56 <proxy>
57 CONNECT %HOSTIP.1078:%HTTPPORT HTTP/1.0\r
58 Host: %HOSTIP.1078:%HTTPPORT\r
59 \r
60 </proxy>
61 <protocol>
62 GET /we/want/that/page/1078 HTTP/1.1\r
63 Host: %HOSTIP.1078:%HTTPPORT\r
64 Accept: */*\r
65 \r
66 GET /we/want/that/page/1078 HTTP/1.0\r
67 Host: %HOSTIP.1078:%HTTPPORT\r
68 Accept: */*\r
69 \r
70 </protocol>
71 <stdout>
72 HTTP/1.1 200 Mighty fine indeed\r
73 Server: test tunnel 2000\r
74 \r
75 HTTP/1.0 200 OK\r
76 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
77 Server: test-server/fake\r
78 Content-Type: text/html\r
79 Funny-head: yesyes\r
80 Content-Length: 9\r
81 Connection: keep-alive\r
82 \r
83 contents
84 HTTP/1.0 200 OK\r
85 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
86 Server: test-server/fake\r
87 Content-Type: text/html\r
88 Funny-head: yesyes\r
89 Content-Length: 9\r
90 Connection: keep-alive\r
91 \r
92 contents
93 </stdout>
94 </verify>
95 </testcase>