2011-09-20 17:13:32 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
2011-10-22 04:30:22 +08:00
|
|
|
HTTP proxy
|
2011-09-20 17:13:32 +08:00
|
|
|
followlocation
|
|
|
|
</keywords>
|
|
|
|
</info>
|
2011-10-22 04:30:22 +08:00
|
|
|
|
2011-09-20 17:13:32 +08:00
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 301 This is a weirdo text message swsbounce
|
|
|
|
Server: test-server/fake
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: //somewhere.example.com/reply/%TESTNUMBER
|
2011-09-20 17:13:32 +08:00
|
|
|
Content-Length: 32
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
Redirect to the same URL again!
|
|
|
|
</data>
|
|
|
|
|
|
|
|
<data1>
|
|
|
|
HTTP/1.1 200 okidoki
|
|
|
|
Server: test-server/fake
|
|
|
|
Content-Length: 4
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
moo
|
2011-10-22 04:30:22 +08:00
|
|
|
</data1>
|
2011-09-20 17:13:32 +08:00
|
|
|
|
|
|
|
<datacheck>
|
|
|
|
HTTP/1.1 301 This is a weirdo text message swsbounce
|
|
|
|
Server: test-server/fake
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: //somewhere.example.com/reply/%TESTNUMBER
|
2011-09-20 17:13:32 +08:00
|
|
|
Content-Length: 32
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
HTTP/1.1 200 okidoki
|
|
|
|
Server: test-server/fake
|
|
|
|
Content-Length: 4
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
moo
|
|
|
|
</datacheck>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP Location: following a // prefixed url
|
|
|
|
</name>
|
|
|
|
<command>
|
2021-03-13 00:38:26 +08:00
|
|
|
http://firstplace.example.com/want/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT
|
2011-09-20 17:13:32 +08:00
|
|
|
</command>
|
2019-10-15 04:29:19 +08:00
|
|
|
<features>
|
|
|
|
proxy
|
|
|
|
</features>
|
2011-09-20 17:13:32 +08:00
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
2021-03-13 00:38:26 +08:00
|
|
|
GET http://firstplace.example.com/want/%TESTNUMBER HTTP/1.1
|
2011-09-20 17:13:32 +08:00
|
|
|
Host: firstplace.example.com
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2011-09-20 17:13:32 +08:00
|
|
|
Accept: */*
|
2016-08-16 14:36:04 +08:00
|
|
|
Proxy-Connection: Keep-Alive
|
2011-09-20 17:13:32 +08:00
|
|
|
|
2021-03-13 00:38:26 +08:00
|
|
|
GET http://somewhere.example.com/reply/%TESTNUMBER HTTP/1.1
|
2011-09-20 17:13:32 +08:00
|
|
|
Host: somewhere.example.com
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2011-09-20 17:13:32 +08:00
|
|
|
Accept: */*
|
2016-08-16 14:36:04 +08:00
|
|
|
Proxy-Connection: Keep-Alive
|
2011-09-20 17:13:32 +08:00
|
|
|
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|