mirror of
https://github.com/curl/curl.git
synced 2025-03-31 16:00:35 +08:00
test1635: verify --fail-with-body with --retry
Almost a dupe of 1634 Closes #8847
This commit is contained in:
parent
0356804d13
commit
3ead914303
@ -205,7 +205,7 @@ test1608 test1609 test1610 test1611 test1612 test1613 \
|
||||
\
|
||||
test1620 test1621 \
|
||||
\
|
||||
test1630 test1631 test1632 test1633 test1634 \
|
||||
test1630 test1631 test1632 test1633 test1634 test1635 \
|
||||
\
|
||||
test1650 test1651 test1652 test1653 test1654 test1655 \
|
||||
test1660 test1661 \
|
||||
|
64
tests/data/test1635
Normal file
64
tests/data/test1635
Normal file
@ -0,0 +1,64 @@
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP GET
|
||||
RETRY-AFTER
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data nocheck="yes">
|
||||
HTTP/1.1 429 too many requests swsbounce
|
||||
Retry-After: 1
|
||||
Content-Length: 4
|
||||
|
||||
moo
|
||||
</data>
|
||||
<data1 nocheck="yes">
|
||||
HTTP/1.1 200 OK
|
||||
Content-Length: 4
|
||||
Connection: close
|
||||
|
||||
hey
|
||||
</data1>
|
||||
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
--retry with a 429 response and Retry-After: and --fail-with-body
|
||||
</name>
|
||||
<command option="no-include">
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1 --fail-with-body
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
GET /%TESTNUMBER HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
User-Agent: curl/%VERSION
|
||||
Accept: */*
|
||||
|
||||
GET /%TESTNUMBER HTTP/1.1
|
||||
Host: %HOSTIP:%HTTPPORT
|
||||
User-Agent: curl/%VERSION
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
<stdout>
|
||||
moo
|
||||
hey
|
||||
</stdout>
|
||||
</verify>
|
||||
</testcase>
|
Loading…
x
Reference in New Issue
Block a user