chiark / gitweb /
Import curl_7.56.1.orig.tar.gz
[curl.git] / tests / data / test1287
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP CONNECT
7 proxytunnel
8 verbose logs
9 </keywords>
10 </info>
11 #
12 # Server-side
13 <reply>
14 <data>
15 HTTP/1.1 200 OK\r
16 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
17 Server: test-server/fake swsclose\r
18 Content-Type: text/html\r
19 Funny-head: yesyes\r
20 Content-Length: 9\r
21 \r
22 contents
23 </data>
24
25 # The purpose of this test is to make sure curl ignores headers
26 # Content-Length and Transfer-Encoding in a successful CONNECT 2xx reply.
27 <connect>
28 HTTP/1.1 200 Mighty fine indeed\r
29 Content-Length: 123\r
30 Transfer-Encoding: chunked\r
31 \r
32 </connect>
33
34 <datacheck>
35 HTTP/1.1 200 Mighty fine indeed\r
36 Content-Length: 123\r
37 Transfer-Encoding: chunked\r
38 \r
39 HTTP/1.1 200 OK\r
40 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
41 Server: test-server/fake swsclose\r
42 Content-Type: text/html\r
43 Funny-head: yesyes\r
44 Content-Length: 9\r
45 \r
46 contents
47 </datacheck>
48 </reply>
49
50 #
51 # Client-side
52 <client>
53 <server>
54 http
55 http-proxy
56 </server>
57 <name>
58 HTTP over proxy-tunnel ignore TE and CL in CONNECT 2xx responses
59 </name>
60 <command>
61 -v --proxytunnel -x %HOSTIP:%PROXYPORT http://test.1287:%HTTPPORT/we/want/that/page/1287
62 </command>
63 </client>
64
65 #
66 # Verify data after the test has been "shot"
67 <verify>
68 <strip>
69 ^User-Agent:.*
70 </strip>
71 <proxy>
72 CONNECT test.1287:%HTTPPORT HTTP/1.1\r
73 Host: test.1287:%HTTPPORT\r
74 Proxy-Connection: Keep-Alive\r
75 \r
76 </proxy>
77 <protocol>
78 GET /we/want/that/page/1287 HTTP/1.1\r
79 Host: test.1287:%HTTPPORT\r
80 Accept: */*\r
81 \r
82 </protocol>
83 <file name="log/stderr1287" mode="text">
84 * Ignoring Content-Length in CONNECT 200 response
85 * Ignoring Transfer-Encoding in CONNECT 200 response
86 </file>
87 <stripfile>
88 s/^.*(?=\* Ignoring (?:Content-Length|Transfer-Encoding) )// or $_ = ''
89 </stripfile>
90 </verify>
91 </testcase>