xref: /curl/tests/data/test1184 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP CONNECT
6HTTP proxy
7proxytunnel
8</keywords>
9</info>
10
11#
12# Server-side
13<reply>
14<connect>
15HTTP/1.1 200 Mighty fine indeed
16Server: test tunnel 2000
17
18</connect>
19
20<data nocheck="yes">
21HTTP/1.1 302 OK
22Location: http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER0002
23Date: Tue, 09 Nov 2010 14:49:00 GMT
24Server: test-server/fake
25Content-Type: text/html
26Funny-head: yesyes
27Content-Length: 9
28Connection: close
29
30contents
31</data>
32
33<data2 nocheck="yes">
34HTTP/1.1 200 OK
35Content-Length: 7
36
37second
38</data2>
39</reply>
40
41#
42# Client-side
43<client>
44<server>
45http
46http-proxy
47</server>
48<name>
49HTTP 1.1 CONNECT with redirect and set -H user-agent
50</name>
51<command>
52-x %HOSTIP:%PROXYPORT -p http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -L -H "User-Agent: %TESTNUMBER-agent"
53</command>
54<features>
55proxy
56</features>
57</client>
58
59#
60# Verify data after the test has been "shot"
61<verify>
62<proxy>
63CONNECT %HOSTIP.%TESTNUMBER:%HTTPPORT HTTP/1.1
64Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
65User-Agent: curl/%VERSION
66Proxy-Connection: Keep-Alive
67
68CONNECT %HOSTIP.%TESTNUMBER:%HTTPPORT HTTP/1.1
69Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
70User-Agent: curl/%VERSION
71Proxy-Connection: Keep-Alive
72
73</proxy>
74<protocol>
75GET /we/want/that/page/%TESTNUMBER HTTP/1.1
76Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
77Accept: */*
78User-Agent: %TESTNUMBER-agent
79
80GET /we/want/that/page/%TESTNUMBER0002 HTTP/1.1
81Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
82Accept: */*
83User-Agent: %TESTNUMBER-agent
84
85</protocol>
86<stdout>
87HTTP/1.1 200 Mighty fine indeed
88Server: test tunnel 2000
89
90HTTP/1.1 302 OK
91Location: http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER0002
92Date: Tue, 09 Nov 2010 14:49:00 GMT
93Server: test-server/fake
94Content-Type: text/html
95Funny-head: yesyes
96Content-Length: 9
97Connection: close
98
99HTTP/1.1 200 Mighty fine indeed
100Server: test tunnel 2000
101
102HTTP/1.1 200 OK
103Content-Length: 7
104
105second
106</stdout>
107</verify>
108</testcase>
109