mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 12:05:06 -05:00
e2b4df7b5e
This makes the tests easier to copy and relocate to other test numbers without having to update content. Closes #6738
99 lines
1.5 KiB
Plaintext
99 lines
1.5 KiB
Plaintext
<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
|
|
Location: /%TESTNUMBER0002
|
|
|
|
</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
|
|
Location: /%TESTNUMBER0002
|
|
|
|
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
|
|
Location: /%TESTNUMBER0002
|
|
|
|
HTTP/1.1 429 too many requests
|
|
Retry-After: 1
|
|
Content-Length: 0
|
|
Connection: close
|
|
|
|
</datacheck>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
--retry with a 429 response and Retry-After:
|
|
</name>
|
|
<command>
|
|
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -d moo --retry 1 -L
|
|
</command>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol>
|
|
POST /%TESTNUMBER HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
Content-Length: 3
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
mooGET /%TESTNUMBER0002 HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
POST /%TESTNUMBER HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
Content-Length: 3
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
mooGET /%TESTNUMBER0002 HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|