1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP CONNECT
7HTTP proxy
8proxytunnel
9</keywords>
10</info>
11
12#
13# Server-side
14<reply>
15<connect>
16HTTP/1.1 200 Mighty fine indeed
17Server: test tunnel 2000
18
19</connect>
20
21<data nocheck="yes">
22HTTP/1.1 200 OK
23Date: Thu, 09 Nov 2010 14:49:00 GMT
24Server: test-server/fake
25Content-Type: text/html
26Funny-head: yesyes
27Content-Length: 9
28Connection: keep-alive
29
30contents
31</data>
32</reply>
33
34#
35# Client-side
36<client>
37<server>
38http
39http-proxy
40</server>
41<name>
42Suppress proxy CONNECT response headers
43</name>
44<command>
45--proxytunnel --suppress-connect-headers --dump-header - --include --write-out "\nCONNECT CODE: %{http_connect}\nRECEIVED HEADER BYTE TOTAL: %{size_header}\n" --proxy %HOSTIP:%PROXYPORT http://%HOSTIP.1288:%HTTPPORT/we/want/that/page/1288
46</command>
47</client>
48
49#
50# Verify data after the test has been "shot"
51<verify>
52<strip>
53^User-Agent:.*
54</strip>
55<proxy>
56CONNECT %HOSTIP.1288:%HTTPPORT HTTP/1.1
57Host: %HOSTIP.1288:%HTTPPORT
58Proxy-Connection: Keep-Alive
59
60</proxy>
61<protocol>
62GET /we/want/that/page/1288 HTTP/1.1
63Host: %HOSTIP.1288:%HTTPPORT
64Accept: */*
65
66</protocol>
67
68# This test is structured to test all the expectations of
69# --suppress-connect-headers, which are:
70# Must suppress in --include and --dump-header
71# Must not suppress in --verbose and --trace
72# Must not suppress in statistics (eg received header byte total)
73<stdout>
74HTTP/1.1 200 OK
75HTTP/1.1 200 OK
76Date: Thu, 09 Nov 2010 14:49:00 GMT
77Date: Thu, 09 Nov 2010 14:49:00 GMT
78Server: test-server/fake
79Server: test-server/fake
80Content-Type: text/html
81Content-Type: text/html
82Funny-head: yesyes
83Funny-head: yesyes
84Content-Length: 9
85Content-Length: 9
86Connection: keep-alive
87Connection: keep-alive
88
89
90contents
91
92CONNECT CODE: 200
93RECEIVED HEADER BYTE TOTAL: 231
94</stdout>
95</verify>
96</testcase>
97