summaryrefslogtreecommitdiff
path: root/methods/basehttp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/basehttp.cc')
-rw-r--r--methods/basehttp.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/methods/basehttp.cc b/methods/basehttp.cc
index c77ab28c6..3b4c60720 100644
--- a/methods/basehttp.cc
+++ b/methods/basehttp.cc
@@ -801,7 +801,19 @@ int BaseHttpMethod::Loop()
case ERROR_WITH_CONTENT_PAGE:
{
Server->RunDataToDevNull(Req);
- Fail();
+ constexpr unsigned int TransientCodes[] = {
+ 408, // Request Timeout
+ 429, // Too Many Requests
+ 500, // Internal Server Error
+ 502, // Bad Gateway
+ 503, // Service Unavailable
+ 504, // Gateway Timeout
+ 599, // Network Connect Timeout Error
+ };
+ if (std::find(std::begin(TransientCodes), std::end(TransientCodes), Req.Result) != std::end(TransientCodes))
+ Fail(true);
+ else
+ Fail();
break;
}