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