2012-01-14 23:34:59 +08:00
|
|
|
<testcase>
|
2018-09-24 06:26:11 +08:00
|
|
|
# https://greenbytes.de/tech/webdav/draft-reschke-http-status-308-latest.html
|
2012-01-14 23:34:59 +08:00
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
|
|
|
308
|
|
|
|
followlocation
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 308 OK swsclose
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: %TESTNUMBER0002
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2012-01-14 23:34:59 +08:00
|
|
|
Connection: close
|
|
|
|
|
|
|
|
</data>
|
|
|
|
<data2>
|
2012-11-15 02:49:12 +08:00
|
|
|
HTTP/1.1 200 OK swsclose
|
|
|
|
Location: this should be ignored
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2012-11-15 02:49:12 +08:00
|
|
|
Connection: close
|
|
|
|
|
2012-01-14 23:34:59 +08:00
|
|
|
body
|
|
|
|
</data2>
|
|
|
|
<datacheck>
|
|
|
|
HTTP/1.1 308 OK swsclose
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: %TESTNUMBER0002
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2012-01-14 23:34:59 +08:00
|
|
|
Connection: close
|
|
|
|
|
2012-11-15 02:49:12 +08:00
|
|
|
HTTP/1.1 200 OK swsclose
|
|
|
|
Location: this should be ignored
|
2020-02-28 22:00:03 +08:00
|
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
2012-11-15 02:49:12 +08:00
|
|
|
Connection: close
|
|
|
|
|
2012-01-14 23:34:59 +08:00
|
|
|
body
|
|
|
|
</datacheck>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP 308-redirect with POST
|
|
|
|
</name>
|
|
|
|
<command>
|
2021-03-13 00:38:26 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/we/%TESTNUMBER -L -d "moo"
|
2012-01-14 23:34:59 +08:00
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol nonewline="yes">
|
2021-03-13 00:38:26 +08:00
|
|
|
POST /we/%TESTNUMBER HTTP/1.1
|
2012-01-14 23:34:59 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2012-01-14 23:34:59 +08:00
|
|
|
Accept: */*
|
|
|
|
Content-Length: 3
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
|
2021-03-13 00:38:26 +08:00
|
|
|
mooPOST /we/%TESTNUMBER0002 HTTP/1.1
|
2012-01-14 23:34:59 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2012-01-14 23:34:59 +08:00
|
|
|
Accept: */*
|
|
|
|
Content-Length: 3
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
|
|
|
|
moo
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|