2008-02-20 05:57:41 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTPS
|
|
|
|
HTTP GET
|
|
|
|
followlocation
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 301 This is a weirdo text message swsclose
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-02-20 05:57:41 +08:00
|
|
|
Server: test-server/fake
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: https://%HOSTIP:%HTTPSPORT/data/%TESTNUMBER0002.txt?coolsite=yes
|
2008-02-20 05:57:41 +08:00
|
|
|
Connection: close
|
|
|
|
|
|
|
|
This server reply is for testing a simple Location: following to HTTPS URL
|
|
|
|
|
|
|
|
</data>
|
|
|
|
<data2>
|
|
|
|
HTTP/1.1 200 Followed here fine swsclose
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-02-20 05:57:41 +08: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 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-02-20 05:57:41 +08:00
|
|
|
Server: test-server/fake
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: https://%HOSTIP:%HTTPSPORT/data/%TESTNUMBER0002.txt?coolsite=yes
|
2008-02-20 05:57:41 +08:00
|
|
|
Connection: close
|
|
|
|
|
|
|
|
HTTP/1.1 200 Followed here fine swsclose
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2008-02-20 05:57:41 +08:00
|
|
|
Server: test-server/fake
|
|
|
|
Content-Length: 52
|
|
|
|
|
|
|
|
If this is received, the location following worked
|
|
|
|
|
|
|
|
</datacheck>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<features>
|
|
|
|
SSL
|
|
|
|
</features>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
https
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP Location: redirect to HTTPS URL
|
|
|
|
</name>
|
|
|
|
<command>
|
2021-03-13 00:38:26 +08:00
|
|
|
-k http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L
|
2008-02-20 05:57:41 +08:00
|
|
|
</command>
|
|
|
|
</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-02-20 05:57:41 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2008-02-20 05:57:41 +08:00
|
|
|
Accept: */*
|
|
|
|
|
2021-03-13 00:38:26 +08:00
|
|
|
GET /data/%TESTNUMBER0002.txt?coolsite=yes HTTP/1.1
|
2008-02-20 05:57:41 +08:00
|
|
|
Host: %HOSTIP:%HTTPSPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2008-02-20 05:57:41 +08:00
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|