/*
- * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
*/
#include "squid.h"
-#include "Debug.h"
+#include "debug/Stream.h"
#include "http/StatusCode.h"
+#include "SquidConfig.h"
const char *
Http::StatusCodeString(const Http::StatusCode status)
return "Precondition Failed";
break;
- case Http::scPayloadTooLarge:
- return "Payload Too Large";
+ case Http::scContentTooLarge:
+ return "Content Too Large";
break;
case Http::scUriTooLong:
return "Unassigned";
}
+bool
+Http::IsReforwardableStatus(const StatusCode s)
+{
+ switch (s) {
+
+ case scBadGateway:
+ case scGatewayTimeout:
+ return true;
+
+ case scForbidden:
+ case scInternalServerError:
+ case scNotImplemented:
+ case scServiceUnavailable:
+ return Config.retry.onerror;
+
+ default:
+ return false;
+ }
+
+ /* NOTREACHED */
+}
+