2020-06-02 04:58:46 +08:00
|
|
|
<testcase>
|
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
<data>
|
|
|
|
HTTP/1.1 301 OK
|
|
|
|
Accept-Ranges: bytes
|
|
|
|
Content-Length: 0
|
|
|
|
Connection: close
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: /%TESTNUMBER0002
|
2020-06-02 04:58:46 +08:00
|
|
|
|
|
|
|
</data>
|
|
|
|
<data2>
|
|
|
|
HTTP/1.1 429 too many requests
|
|
|
|
Retry-After: 1
|
|
|
|
Content-Length: 0
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
</data2>
|
|
|
|
|
|
|
|
<datacheck>
|
|
|
|
HTTP/1.1 301 OK
|
|
|
|
Accept-Ranges: bytes
|
|
|
|
Content-Length: 0
|
|
|
|
Connection: close
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: /%TESTNUMBER0002
|
2020-06-02 04:58:46 +08:00
|
|
|
|
|
|
|
HTTP/1.1 429 too many requests
|
|
|
|
Retry-After: 1
|
|
|
|
Content-Length: 0
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
HTTP/1.1 301 OK
|
|
|
|
Accept-Ranges: bytes
|
|
|
|
Content-Length: 0
|
|
|
|
Connection: close
|
2021-03-13 00:38:26 +08:00
|
|
|
Location: /%TESTNUMBER0002
|
2020-06-02 04:58:46 +08:00
|
|
|
|
|
|
|
HTTP/1.1 429 too many requests
|
|
|
|
Retry-After: 1
|
|
|
|
Content-Length: 0
|
|
|
|
Connection: close
|
|
|
|
|
|
|
|
</datacheck>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
2021-01-05 00:58:05 +08:00
|
|
|
<name>
|
|
|
|
--retry with a 429 response and Retry-After:
|
|
|
|
</name>
|
|
|
|
<command>
|
2021-03-13 00:38:26 +08:00
|
|
|
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -d moo --retry 1 -L
|
2020-06-02 04:58:46 +08:00
|
|
|
</command>
|
|
|
|
</client>
|
|
|
|
|
|
|
|
#
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<protocol>
|
2021-03-13 00:38:26 +08:00
|
|
|
POST /%TESTNUMBER HTTP/1.1
|
2020-06-02 04:58:46 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2020-06-02 04:58:46 +08:00
|
|
|
Accept: */*
|
|
|
|
Content-Length: 3
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
|
2021-03-13 00:38:26 +08:00
|
|
|
mooGET /%TESTNUMBER0002 HTTP/1.1
|
2020-06-02 04:58:46 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2020-06-02 04:58:46 +08:00
|
|
|
Accept: */*
|
|
|
|
|
2021-03-13 00:38:26 +08:00
|
|
|
POST /%TESTNUMBER HTTP/1.1
|
2020-06-02 04:58:46 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2020-06-02 04:58:46 +08:00
|
|
|
Accept: */*
|
|
|
|
Content-Length: 3
|
|
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
|
2021-03-13 00:38:26 +08:00
|
|
|
mooGET /%TESTNUMBER0002 HTTP/1.1
|
2020-06-02 04:58:46 +08:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2020-10-02 19:45:24 +08:00
|
|
|
User-Agent: curl/%VERSION
|
2020-06-02 04:58:46 +08:00
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
</protocol>
|
|
|
|
</verify>
|
|
|
|
</testcase>
|