Skip to content

Commit

Permalink
curl: ensure HTTP 429 triggers --retry
Browse files Browse the repository at this point in the history
This completes #3794.

Also make sure the new tests from #4195 are enabled

Closes #4465
  • Loading branch information
stain authored and bagder committed Oct 5, 2019
1 parent 1d7fe83 commit f7f0b00
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/tool_operate.c
Expand Up @@ -468,6 +468,7 @@ static CURLcode post_per_transfer(struct GlobalConfig *global,
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response); curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);


switch(response) { switch(response) {
case 429: /* Too Many Requests (RFC6585) */
case 500: /* Internal Server Error */ case 500: /* Internal Server Error */
case 502: /* Bad Gateway */ case 502: /* Bad Gateway */
case 503: /* Service Unavailable */ case 503: /* Service Unavailable */
Expand Down
2 changes: 1 addition & 1 deletion tests/data/Makefile.inc
Expand Up @@ -179,7 +179,7 @@ test1540 test1541 \
test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \ test1550 test1551 test1552 test1553 test1554 test1555 test1556 test1557 \
test1558 test1559 test1560 test1561 test1562 test1563 \ 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 \ test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \
test1608 test1609 test1620 test1621 \ test1608 test1609 test1620 test1621 \
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test1596
Expand Up @@ -12,7 +12,7 @@ If-Modified-Since
# Server-side # Server-side
<reply> <reply>
<data nocheck="yes"> <data nocheck="yes">
HTTP/1.1 503 Error HTTP/1.1 429 Too Many Requests
Date: Thu, 11 Jul 2019 02:26:59 GMT Date: Thu, 11 Jul 2019 02:26:59 GMT
Server: test-server/swsclose Server: test-server/swsclose
Retry-After: Thu, 11 Jul 2024 02:26:59 GMT Retry-After: Thu, 11 Jul 2024 02:26:59 GMT
Expand Down

0 comments on commit f7f0b00

Please sign in to comment.