2008-04-10 12:21:08 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
|
|
|
followlocation
|
|
|
|
cookies
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 301 This is a weirdo text message
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-04-10 12:21:08 +08:00
|
|
|
Server: test-server/fake
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: ../data/%TESTNUMBER0002.txt
|
2008-04-10 12:21:08 +08:00
|
|
|
Set-Cookie: firstcookie=want; path=/want/
|
|
|
|
Content-Length: 69
|
|
|
|
|
|
|
|
This server reply is for testing a Location: following with cookies
|
|
|
|
|
|
|
|
</data>
|
|
|
|
<data2>
|
|
|
|
HTTP/1.1 301 This is a weirdo text message
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-04-10 12:21:08 +08:00
|
|
|
Server: test-server/fake
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: ../want/%TESTNUMBER0003.txt
|
2008-04-10 12:21:08 +08:00
|
|
|
Set-Cookie: nextcookie=data; path=/data/
|
|
|
|
Content-Length: 69
|
|
|
|
|
|
|
|
This server reply is for testing a Location: following with cookies
|
|
|
|
|
|
|
|
</data2>
|
|
|
|
<data3>
|
|
|
|
HTTP/1.1 200 Followed here fine
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-04-10 12:21:08 +08:00
|
|
|
Server: test-server/fake
|
|
|
|
Content-Length: 52
|
|
|
|
|
|
|
|
If this is received, the location following worked
|
|
|
|
|
|
|
|
</data3>
|
|
|
|
<datacheck>
|
|
|
|
HTTP/1.1 301 This is a weirdo text message
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-04-10 12:21:08 +08:00
|
|
|
Server: test-server/fake
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: ../data/%TESTNUMBER0002.txt
|
2008-04-10 12:21:08 +08:00
|
|
|
Set-Cookie: firstcookie=want; path=/want/
|
|
|
|
Content-Length: 69
|
|
|
|
|
|
|
|
HTTP/1.1 301 This is a weirdo text message
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-04-10 12:21:08 +08:00
|
|
|
Server: test-server/fake
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: ../want/%TESTNUMBER0003.txt
|
2008-04-10 12:21:08 +08:00
|
|
|
Set-Cookie: nextcookie=data; path=/data/
|
|
|
|
Content-Length: 69
|
|
|
|
|
|
|
|
HTTP/1.1 200 Followed here fine
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-04-10 12:21:08 +08:00
|
|
|
Server: test-server/fake
|
|
|
|
Content-Length: 52
|
|
|
|
|
|
|
|
If this is received, the location following worked
|
|
|
|
|
|
|
|
</datacheck>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
2023-10-04 17:35:54 +08:00
|
|
|
<name>
|
2008-04-10 12:21:08 +08:00
|
|
|
HTTP Location: following with cookies
|
2023-10-04 17:35:54 +08:00
|
|
|
</name>
|
|
|
|
<command>
|
2023-03-29 09:20:54 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -c %LOGDIR/jar%TESTNUMBER
|
2008-04-10 12:21:08 +08:00
|
|
|
</command>
|
2023-03-09 18:29:56 +08:00
|
|
|
<features>
|
|
|
|
cookies
|
|
|
|
</features>
|
2008-04-10 12:21:08 +08:00
|
|
|
</client>
|
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
2021-03-13 00:38:26 +08:00
|
|
|
GET /want/%TESTNUMBER HTTP/1.1
|
2008-04-10 12:21:08 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2008-04-10 12:21:08 +08:00
|
|
|
Accept: */*
|
|
|
|
|
2021-03-13 00:38:26 +08:00
|
|
|
GET /data/%TESTNUMBER0002.txt HTTP/1.1
|
2008-04-10 12:21:08 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2008-04-10 12:21:08 +08:00
|
|
|
Accept: */*
|
|
|
|
|
2021-03-13 00:38:26 +08:00
|
|
|
GET /want/%TESTNUMBER0003.txt HTTP/1.1
|
2008-04-10 12:21:08 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2008-04-10 12:21:08 +08:00
|
|
|
Accept: */*
|
|
|
|
Cookie: firstcookie=want
|
|
|
|
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|