From 3ead91430374f70c885e5ad900258540f47e1c59 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 May 2022 10:04:18 +0200 Subject: [PATCH] test1635: verify --fail-with-body with --retry Almost a dupe of 1634 Closes #8847 --- tests/data/Makefile.inc | 2 +- tests/data/test1635 | 64 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1635 diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index 75f31ba60a..5c4b113e6c 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -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 \ diff --git a/tests/data/test1635 b/tests/data/test1635 new file mode 100644 index 0000000000..399846c004 --- /dev/null +++ b/tests/data/test1635 @@ -0,0 +1,64 @@ + + + +HTTP +HTTP GET +RETRY-AFTER + + + +# +# Server-side + + +HTTP/1.1 429 too many requests swsbounce +Retry-After: 1 +Content-Length: 4 + +moo + + +HTTP/1.1 200 OK +Content-Length: 4 +Connection: close + +hey + + + + +# +# Client-side + + +http + + +--retry with a 429 response and Retry-After: and --fail-with-body + + +http://%HOSTIP:%HTTPPORT/%TESTNUMBER --retry 1 --fail-with-body + + + +# +# Verify data after the test has been "shot" + + +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: */* + + + +moo +hey + + +