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
|
2021-03-12 11:38:26 -05:00
|
|
|
Location: data/%TESTNUMBER0002.txt?coolsite=yes
|
2008-08-23 17:27:58 -04:00
|
|
|
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
|
2021-03-12 11:38:26 -05:00
|
|
|
Location: data/%TESTNUMBER0002.txt?coolsite=yes
|
2008-08-23 17:27:58 -04:00
|
|
|
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-03-12 11:38:26 -05:00
|
|
|
http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER --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>
|
2021-03-12 11:38:26 -05:00
|
|
|
GET /want/%TESTNUMBER HTTP/1.1
|
2008-08-23 17:27:58 -04:00
|
|
|
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
|
|
|
|
|
2021-03-12 11:38:26 -05:00
|
|
|
GET /want/data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1
|
2008-08-23 17:27:58 -04:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 07:45:24 -04:00
|
|
|
User-Agent: curl/%VERSION
|
2008-08-23 17:27:58 -04:00
|
|
|
Accept: */*
|
2021-03-12 11:38:26 -05:00
|
|
|
Referer: http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER
|
2008-08-23 17:27:58 -04:00
|
|
|
|
|
|
|
</protocol>
|
2021-02-19 08:57:19 -05:00
|
|
|
<stderr nonewline="yes">
|
2021-03-12 11:38:26 -05:00
|
|
|
|http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER|
|
2021-02-19 08:57:19 -05:00
|
|
|
</stderr>
|
2008-08-23 17:27:58 -04:00
|
|
|
</verify>
|
|
|
|
</testcase>
|