mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:33:31 +03:00
tool_operate: retry on HTTP response codes 522 and 524
- Treat HTTP response codes 522 and 524 as a transient error since Cloudflare may use them instead of 504 to signal timeout. For example here is a 522 error message from Cloudflare: "The initial connection between Cloudflare's network and the origin web server timed out. As a result, the web page can not be displayed." Prior to this change the curl tool did not retry on HTTP response codes 522 and 524 when --retry was used. Fixes https://github.com/curl/curl/discussions/16143 Closes https://github.com/curl/curl/pull/19011
This commit is contained in:
parent
64ed2ea196
commit
fe06127ded
2 changed files with 4 additions and 2 deletions
|
|
@ -412,6 +412,8 @@ static CURLcode retrycheck(struct OperationConfig *config,
|
|||
case 502: /* Bad Gateway */
|
||||
case 503: /* Service Unavailable */
|
||||
case 504: /* Gateway Timeout */
|
||||
case 522: /* Connection Timed Out (Cloudflare) */
|
||||
case 524: /* Proxy Read Timeout (Cloudflare) */
|
||||
retry = RETRY_HTTP;
|
||||
/*
|
||||
* At this point, we have already written data to the output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue