test3028 (1073B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP CONNECT 6 </keywords> 7 </info> 8 # 9 # Server-side 10 <reply> 11 <connect> 12 HTTP/1.1 200 Mighty fine indeed 13 14 </connect> 15 16 <data nocheck="yes"> 17 HTTP/1.1 404 Not Found 18 Server: nginx/1.23.2 19 Date: Wed, 09 Nov 2022 09:44:58 GMT 20 Content-Type: text/plain; charset=utf-8 21 Content-Length: 4 22 Connection: keep-alive 23 X-Content-Type-Options: nosniff 24 25 haha 26 </data> 27 28 </reply> 29 30 # 31 # Client-side 32 <client> 33 <server> 34 http 35 http-proxy 36 </server> 37 <name> 38 HTTP GET when PROXY Protocol enabled behind a proxy 39 </name> 40 <command> 41 --haproxy-protocol http://%HOSTIP:%HTTPPORT/page --proxytunnel -x %HOSTIP:%PROXYPORT 42 </command> 43 <features> 44 proxy 45 </features> 46 </client> 47 48 # 49 # Verify data after the test has been "shot" 50 <verify> 51 <strippart> 52 s/^PROXY TCP4 %CLIENTIP %HOSTIP (\d*) %PROXYPORT/proxy-line/ 53 </strippart> 54 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 63 <protocol> 64 proxy-line 65 GET /page HTTP/1.1 66 Host: %HOSTIP:%HTTPPORT 67 User-Agent: curl/%VERSION 68 Accept: */* 69 70 </protocol> 71 72 </verify> 73 </testcase>