2016-12-01 20:05:04 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
2019-05-27 19:42:05 +08:00
|
|
|
proxy
|
|
|
|
haproxy
|
2016-12-01 20:05:04 +08:00
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Server-side
|
2021-03-13 00:38:26 +08:00
|
|
|
<reply name="%TESTNUMBER">
|
2019-02-22 05:06:16 +08:00
|
|
|
<data nocheck="yes">
|
2016-12-01 20:05:04 +08:00
|
|
|
HTTP/1.1 200 OK
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2016-12-01 20:05:04 +08:00
|
|
|
Server: test-server/fake
|
|
|
|
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
|
|
|
ETag: "21025-dc7-39462498"
|
|
|
|
Accept-Ranges: bytes
|
|
|
|
Content-Length: 6
|
|
|
|
Connection: close
|
|
|
|
Content-Type: text/html
|
|
|
|
Funny-head: barkbark
|
|
|
|
|
|
|
|
-foo-
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP GET when PROXY Protocol enabled
|
|
|
|
</name>
|
|
|
|
<command>
|
2021-03-13 00:38:26 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --haproxy-protocol -H "Testno: %TESTNUMBER"
|
2016-12-01 20:05:04 +08:00
|
|
|
</command>
|
2019-10-15 04:29:19 +08:00
|
|
|
<features>
|
|
|
|
proxy
|
|
|
|
</features>
|
2016-12-01 20:05:04 +08:00
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
2018-06-12 21:48:47 +08:00
|
|
|
<strippart>
|
|
|
|
s/^PROXY TCP4 %CLIENTIP %HOSTIP (\d*) %HTTPPORT/proxy-line/
|
|
|
|
</strippart>
|
2016-12-01 20:05:04 +08:00
|
|
|
<protocol>
|
2018-06-12 21:48:47 +08:00
|
|
|
proxy-line
|
2021-03-13 00:38:26 +08:00
|
|
|
GET /%TESTNUMBER HTTP/1.1
|
2016-12-01 20:05:04 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2016-12-01 20:05:04 +08:00
|
|
|
Accept: */*
|
2021-03-13 00:38:26 +08:00
|
|
|
Testno: %TESTNUMBER
|
2016-12-01 20:05:04 +08:00
|
|
|
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|