]> granicus.if.org Git - curl/commitdiff
curl: ensure HTTP 429 triggers --retry
authorStian Soiland-Reyes <stain@apache.org>
Fri, 4 Oct 2019 15:18:23 +0000 (16:18 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 5 Oct 2019 09:41:06 +0000 (11:41 +0200)
This completes #3794.

Also make sure the new tests from #4195 are enabled

Closes #4465

src/tool_operate.c
tests/data/Makefile.inc
tests/data/test1596

index c2fed998c8c05d78acc5171888cc778db2535668..b82a6672d4d06dd677dfe210fea79a91f60e7509 100644 (file)
@@ -468,6 +468,7 @@ static CURLcode post_per_transfer(struct GlobalConfig *global,
         curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
 
         switch(response) {
+        case 429: /* Too Many Requests (RFC6585) */
         case 500: /* Internal Server Error */
         case 502: /* Bad Gateway */
         case 503: /* Service Unavailable */
index 5b0af4e30891f384d22f34bae606fdce38b297a9..f082cc46a4143ad182e01533b3c5b5ffe9e98068 100644 (file)
@@ -179,7 +179,7 @@ test1540 test1541 \
 test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \
 test1558 test1559 test1560 test1561 test1562 test1563 \
 \
-test1590 test1591 test1592 test1593 test1594 \
+test1590 test1591 test1592 test1593 test1594 test1595 test1596 \
 \
 test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \
 test1608 test1609 test1620 test1621 \
index 9a8cb480e00bd14deb952105d3282c0f4b0e7ce8..77a10f08a8215d052ad479f6cf3b410c08579a36 100644 (file)
@@ -12,7 +12,7 @@ If-Modified-Since
 # Server-side
 <reply>
 <data nocheck="yes">
-HTTP/1.1 503 Error
+HTTP/1.1 429 Too Many Requests
 Date: Thu, 11 Jul 2019 02:26:59 GMT
 Server: test-server/swsclose
 Retry-After: Thu, 11 Jul 2024 02:26:59 GMT