You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that cloudflare CDN can return HTTP code 522 for server timeout instead of 504, with this message:
"The initial connection between Cloudflare's network and the origin web server timed out. As a result, the web page can not be displayed."
Does anyone else think that code is worth adding to the list of transient codes to --retry?
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 007a5e0..9bd8445 100644
--- a/src/tool_operate.c+++ b/src/tool_operate.c@@ -576,14 +576,15 @@ static CURLcode post_per_transfer(struct GlobalConfig *global,
switch(response) {
case 408: /* Request Timeout */
case 429: /* Too Many Requests (RFC6585) */
case 500: /* Internal Server Error */
case 502: /* Bad Gateway */
case 503: /* Service Unavailable */
case 504: /* Gateway Timeout */
+ case 522: /* Connection Timed Out (Cloudflare) */
retry = RETRY_HTTP;
/*
* At this point, we have already written data to the output
* file (or terminal). If we write to a file, we must rewind
* or close/re-open the file so that the next attempt starts
* over from the beginning.
*
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've noticed that cloudflare CDN can return HTTP code 522 for server timeout instead of 504, with this message:
"The initial connection between Cloudflare's network and the origin web server timed out. As a result, the web page can not be displayed."
Does anyone else think that code is worth adding to the list of transient codes to --retry?
Beta Was this translation helpful? Give feedback.
All reactions