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: Tue, 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:%HTTPPORT/we/want/that/page/%TESTNUMBER 46</command> 47<features> 48proxy 49</features> 50</client> 51 52# 53# Verify data after the test has been "shot" 54<verify> 55<proxy> 56CONNECT %HOSTIP:%HTTPPORT HTTP/1.1 57Host: %HOSTIP:%HTTPPORT 58User-Agent: curl/%VERSION 59Proxy-Connection: Keep-Alive 60 61</proxy> 62<protocol> 63GET /we/want/that/page/%TESTNUMBER HTTP/1.1 64Host: %HOSTIP:%HTTPPORT 65User-Agent: curl/%VERSION 66Accept: */* 67 68</protocol> 69 70# This test is structured to test all the expectations of 71# --suppress-connect-headers, which are: 72# Must suppress in --include and --dump-header 73# Must not suppress in --verbose and --trace 74# Must not suppress in statistics (eg received header byte total) 75<stdout> 76HTTP/1.1 200 OK 77HTTP/1.1 200 OK 78Date: Tue, 09 Nov 2010 14:49:00 GMT 79Date: Tue, 09 Nov 2010 14:49:00 GMT 80Server: test-server/fake 81Server: test-server/fake 82Content-Type: text/html 83Content-Type: text/html 84Funny-head: yesyes 85Funny-head: yesyes 86Content-Length: 9 87Content-Length: 9 88Connection: keep-alive 89Connection: keep-alive 90 91 92contents 93 94CONNECT CODE: 200 95RECEIVED HEADER BYTE TOTAL: 231 96</stdout> 97</verify> 98</testcase> 99