]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1635: verify --fail-with-body with --retry
authorDaniel Stenberg <daniel@haxx.se>
Mon, 16 May 2022 08:04:18 +0000 (10:04 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 16 May 2022 08:04:21 +0000 (10:04 +0200)
Almost a dupe of 1634

Closes #8847

tests/data/Makefile.inc
tests/data/test1635 [new file with mode: 0644]

index 75f31ba60a49e911bda3ff6acecadcbd3fa2404e..5c4b113e6c6373c9792908dc8e7656a7cb8faa00 100644 (file)
@@ -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 (file)
index 0000000..399846c
--- /dev/null
@@ -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\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+GET /%TESTNUMBER HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+<stdout>
+moo
+hey
+</stdout>
+</verify>
+</testcase>