From d6807890696019308bc885871575f3c2dac875d4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 1 Mar 2026 13:21:11 +0100 Subject: [PATCH] test1637: verify --fail and --retry with 502 response code It should exit with 22 after the second retry. Ref: #20771 Cloes #20780 --- tests/data/Makefile.am | 2 +- tests/data/test1637 | 58 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1637 diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index ecbcc28fe9..c442fa13c2 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -216,7 +216,7 @@ test1606 test1607 test1608 test1609 test1610 test1611 test1612 test1613 \ test1614 test1615 test1616 test1617 \ test1620 test1621 test1622 test1623 \ \ -test1630 test1631 test1632 test1633 test1634 test1635 test1636 \ +test1630 test1631 test1632 test1633 test1634 test1635 test1636 test1637 \ \ test1640 test1641 test1642 test1643 \ \ diff --git a/tests/data/test1637 b/tests/data/test1637 new file mode 100644 index 0000000000..1a76481a43 --- /dev/null +++ b/tests/data/test1637 @@ -0,0 +1,58 @@ + + + + +HTTP +--retry +--fail + + + +# Server-side + + +HTTP/1.1 502 Not OK +Content-Length: 6 +Content-Type: text/html + +-foo- + + + +# Client-side + + +http + + +HTTP 502 with --fail and --retry 2 + + +http://%HOSTIP:%HTTPPORT/%TESTNUMBER --fail --retry 2 --retry-delay 0.1 + + + +# 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: */* + +GET /%TESTNUMBER HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +User-Agent: curl/%VERSION +Accept: */* + + + +22 + + +