test1288 (1869B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 HTTP CONNECT 7 HTTP proxy 8 proxytunnel 9 </keywords> 10 </info> 11 12 # 13 # Server-side 14 <reply> 15 <connect> 16 HTTP/1.1 200 Mighty fine indeed 17 Server: test tunnel 2000 18 19 </connect> 20 21 <data nocheck="yes"> 22 HTTP/1.1 200 OK 23 Date: Tue, 09 Nov 2010 14:49:00 GMT 24 Server: test-server/fake 25 Content-Type: text/html 26 Funny-head: yesyes 27 Content-Length: 9 28 Connection: keep-alive 29 30 contents 31 </data> 32 </reply> 33 34 # 35 # Client-side 36 <client> 37 <server> 38 http 39 http-proxy 40 </server> 41 <name> 42 Suppress 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> 48 proxy 49 </features> 50 </client> 51 52 # 53 # Verify data after the test has been "shot" 54 <verify> 55 <proxy> 56 CONNECT %HOSTIP:%HTTPPORT HTTP/1.1 57 Host: %HOSTIP:%HTTPPORT 58 User-Agent: curl/%VERSION 59 Proxy-Connection: Keep-Alive 60 61 </proxy> 62 <protocol> 63 GET /we/want/that/page/%TESTNUMBER HTTP/1.1 64 Host: %HOSTIP:%HTTPPORT 65 User-Agent: curl/%VERSION 66 Accept: */* 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> 76 HTTP/1.1 200 OK 77 HTTP/1.1 200 OK 78 Date: Tue, 09 Nov 2010 14:49:00 GMT 79 Date: Tue, 09 Nov 2010 14:49:00 GMT 80 Server: test-server/fake 81 Server: test-server/fake 82 Content-Type: text/html 83 Content-Type: text/html 84 Funny-head: yesyes 85 Funny-head: yesyes 86 Content-Length: 9 87 Content-Length: 9 88 Connection: keep-alive 89 Connection: keep-alive 90 91 92 contents 93 94 CONNECT CODE: 200 95 RECEIVED HEADER BYTE TOTAL: 231 96 </stdout> 97 </verify> 98 </testcase>