2008-07-31 05:04:44 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP POST
|
|
|
|
followlocation
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 301 OK swsclose
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: moo/testcase/%TESTNUMBER0002
|
2008-07-31 05:04:44 +08:00
|
|
|
Date: Thu, 31 Jul 2008 14:49:00 GMT
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
</data>
|
|
|
|
<data2>
|
|
|
|
HTTP/1.1 200 OK swsclose
|
|
|
|
Date: Thu, 31 Jul 2008 14:49:00 GMT
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
body
|
|
|
|
</data2>
|
|
|
|
<datacheck>
|
|
|
|
HTTP/1.1 301 OK swsclose
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: moo/testcase/%TESTNUMBER0002
|
2008-07-31 05:04:44 +08:00
|
|
|
Date: Thu, 31 Jul 2008 14:49:00 GMT
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
HTTP/1.1 200 OK swsclose
|
|
|
|
Date: Thu, 31 Jul 2008 14:49:00 GMT
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
body
|
|
|
|
</datacheck>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
|
|
|
<name>
|
|
|
|
HTTP POST from file with 301 redirect and --post301
|
|
|
|
</name>
|
2021-03-13 00:38:26 +08:00
|
|
|
<file name="log/test%TESTNUMBER.txt">
|
2008-07-31 05:04:44 +08:00
|
|
|
field=data
|
|
|
|
</file>
|
|
|
|
<command>
|
2021-03-13 00:38:26 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/blah/%TESTNUMBER -L -d @log/test%TESTNUMBER.txt --post301
|
2008-07-31 05:04:44 +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 /blah/%TESTNUMBER HTTP/1.1
|
2008-07-31 05:04:44 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2008-07-31 05:04:44 +08:00
|
|
|
Accept: */*
|
|
|
|
Content-Length: 10
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
|
2021-03-13 00:38:26 +08:00
|
|
|
field=dataPOST /blah/moo/testcase/%TESTNUMBER0002 HTTP/1.1
|
2008-07-31 05:04:44 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2008-07-31 05:04:44 +08:00
|
|
|
Accept: */*
|
|
|
|
Content-Length: 10
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
|
|
|
|
field=data
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|