2008-05-01 05:20:08 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
|
|
|
redirect_url
|
|
|
|
followlocation
|
2008-07-31 10:51:44 +08:00
|
|
|
--write-out
|
2008-05-01 05:20:08 +08:00
|
|
|
</keywords>
|
|
|
|
</info>
|
2008-07-31 10:51:44 +08:00
|
|
|
|
2008-05-01 05:20:08 +08:00
|
|
|
# Server-side
|
|
|
|
<reply>
|
2009-01-08 05:57:26 +08:00
|
|
|
<data nocheck="yes">
|
2014-02-01 20:47:00 +08:00
|
|
|
HTTP/1.1 301 This is a weirdo text message swsclose
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: data/%TESTNUMBER0002.txt?coolsite=yes
|
2014-02-01 20:47:00 +08:00
|
|
|
Content-Length: 62
|
|
|
|
Connection: close
|
|
|
|
|
2008-05-01 05:20:08 +08:00
|
|
|
This server reply is for testing a simple Location: following
|
|
|
|
</data>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP Location: and 'redirect_url' check
|
|
|
|
</name>
|
2018-10-05 05:53:32 +08:00
|
|
|
<command>
|
2021-03-13 00:38:26 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER -w '%{redirect_url} %{url} %{exitcode} %{errormsg}\n'
|
2008-05-01 05:20:08 +08:00
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
2021-03-13 00:38:26 +08:00
|
|
|
GET /we/want/our/%TESTNUMBER HTTP/1.1
|
2008-05-01 05:20:08 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2008-05-01 05:20:08 +08:00
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
</protocol>
|
2014-02-01 20:47:00 +08:00
|
|
|
<stdout>
|
|
|
|
HTTP/1.1 301 This is a weirdo text message swsclose
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: data/%TESTNUMBER0002.txt?coolsite=yes
|
2014-02-01 20:47:00 +08:00
|
|
|
Content-Length: 62
|
|
|
|
Connection: close
|
|
|
|
|
2008-05-01 05:20:08 +08:00
|
|
|
This server reply is for testing a simple Location: following
|
2021-03-13 00:38:26 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/we/want/our/data/%TESTNUMBER0002.txt?coolsite=yes http://%HOSTIP:%HTTPPORT/we/want/our/%TESTNUMBER 0
|
2008-05-01 05:20:08 +08:00
|
|
|
</stdout>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|