2008-08-23 17:27:58 -04:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
|
|
|
followlocation
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 301 This is a weirdo text message swsclose
|
2020-02-28 09:00:03 -05:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-08-23 17:27:58 -04:00
|
|
|
Server: test-server/fake
|
|
|
|
Location: data/10670002.txt?coolsite=yes
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
This server reply is for testing a simple Location: following
|
|
|
|
|
|
|
|
</data>
|
|
|
|
<data2>
|
|
|
|
HTTP/1.1 200 Followed here fine swsclose
|
2020-02-28 09:00:03 -05:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-08-23 17:27:58 -04:00
|
|
|
Server: test-server/fake
|
|
|
|
Content-Length: 52
|
|
|
|
|
|
|
|
If this is received, the location following worked
|
|
|
|
|
|
|
|
</data2>
|
|
|
|
<datacheck>
|
|
|
|
HTTP/1.1 301 This is a weirdo text message swsclose
|
2020-02-28 09:00:03 -05:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-08-23 17:27:58 -04:00
|
|
|
Server: test-server/fake
|
|
|
|
Location: data/10670002.txt?coolsite=yes
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
HTTP/1.1 200 Followed here fine swsclose
|
2020-02-28 09:00:03 -05:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-08-23 17:27:58 -04:00
|
|
|
Server: test-server/fake
|
|
|
|
Content-Length: 52
|
|
|
|
|
|
|
|
If this is received, the location following worked
|
|
|
|
|
|
|
|
</datacheck>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP Location: following with auto-referer
|
|
|
|
</name>
|
|
|
|
<command>
|
2021-02-19 08:57:19 -05:00
|
|
|
http://%HOSTIP:%HTTPPORT/want/1067 --silent --location --referer "firstone.html;auto" --write-out "%{stderr}|%{referer}|"
|
2008-08-23 17:27:58 -04:00
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
|
|
|
GET /want/1067 HTTP/1.1
|
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 07:45:24 -04:00
|
|
|
User-Agent: curl/%VERSION
|
2008-08-23 17:27:58 -04:00
|
|
|
Accept: */*
|
|
|
|
Referer: firstone.html
|
|
|
|
|
|
|
|
GET /want/data/10670002.txt?coolsite=yes HTTP/1.1
|
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 07:45:24 -04:00
|
|
|
User-Agent: curl/%VERSION
|
2008-08-23 17:27:58 -04:00
|
|
|
Accept: */*
|
|
|
|
Referer: http://%HOSTIP:%HTTPPORT/want/1067
|
|
|
|
|
|
|
|
</protocol>
|
2021-02-19 08:57:19 -05:00
|
|
|
<stderr nonewline="yes">
|
|
|
|
|http://%HOSTIP:%HTTPPORT/want/1067|
|
|
|
|
</stderr>
|
2008-08-23 17:27:58 -04:00
|
|
|
</verify>
|
|
|
|
</testcase>
|