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
|
|
|
|
Location: data/10290002.txt?coolsite=yes
|
|
|
|
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>
|
2008-05-01 05:20:08 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/we/want/our/1029 -w '%{redirect_url}\n'
|
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<strip>
|
|
|
|
^User-Agent:.*
|
|
|
|
</strip>
|
|
|
|
<protocol>
|
|
|
|
GET /we/want/our/1029 HTTP/1.1
|
|
|
|
Host: %HOSTIP:%HTTPPORT
|
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
</protocol>
|
2014-02-01 20:47:00 +08:00
|
|
|
<stdout>
|
|
|
|
HTTP/1.1 301 This is a weirdo text message swsclose
|
|
|
|
Location: data/10290002.txt?coolsite=yes
|
|
|
|
Content-Length: 62
|
|
|
|
Connection: close
|
|
|
|
|
2008-05-01 05:20:08 +08:00
|
|
|
This server reply is for testing a simple Location: following
|
2008-05-01 18:52:12 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/we/want/our/data/10290002.txt?coolsite=yes
|
2008-05-01 05:20:08 +08:00
|
|
|
</stdout>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|