mirror of
https://github.com/curl/curl.git
synced 2024-12-21 06:50:10 +08:00
48cbd8f713
These are needed to skip some tests when configure options have disabled certain features.
100 lines
1.5 KiB
Plaintext
100 lines
1.5 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP GET
|
|
RETRY-AFTER
|
|
</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>
|