3 #include "http/StatusCode.h"
6 Http::StatusCodeString(const Http::StatusCode status
)
12 return "Init"; /* we init .status with code 0 */
16 case Http::scContinue
:
20 case Http::scSwitchingProtocols
:
21 return "Switching Protocols";
24 case Http::scProcessing
:
37 case Http::scAccepted
:
41 case Http::scNonAuthoritativeInformation
:
42 return "Non-Authoritative Information";
45 case Http::scNoContent
:
49 case Http::scResetContent
:
50 return "Reset Content";
53 case Http::scPartialContent
:
54 return "Partial Content";
57 case Http::scMultiStatus
:
58 return "Multi-Status";
61 case Http::scAlreadyReported
:
62 return "Already Reported";
70 case Http::scMultipleChoices
:
71 return "Multiple Choices";
74 case Http::scMovedPermanently
:
75 return "Moved Permanently";
82 case Http::scSeeOther
:
86 case Http::scNotModified
:
87 return "Not Modified";
90 case Http::scUseProxy
:
94 case Http::scTemporaryRedirect
:
95 return "Temporary Redirect";
98 case Http::scPermanentRedirect
:
99 return "Permanent Redirect";
103 case Http::scBadRequest
:
104 return "Bad Request";
107 case Http::scUnauthorized
:
108 return "Unauthorized";
111 case Http::scPaymentRequired
:
112 return "Payment Required";
115 case Http::scForbidden
:
119 case Http::scNotFound
:
123 case Http::scMethodNotAllowed
:
124 return "Method Not Allowed";
127 case Http::scNotAcceptable
:
128 return "Not Acceptable";
131 case Http::scProxyAuthenticationRequired
:
132 return "Proxy Authentication Required";
135 case Http::scRequestTimeout
:
136 return "Request Timeout";
139 case Http::scConflict
:
147 case Http::scLengthRequired
:
148 return "Length Required";
151 case Http::scPreconditionFailed
:
152 return "Precondition Failed";
155 case Http::scPayloadTooLarge
:
156 return "Payload Too Large";
159 case Http::scUriTooLong
:
160 return "URI Too Long";
163 case Http::scUnsupportedMediaType
:
164 return "Unsupported Media Type";
167 case Http::scRequestedRangeNotSatisfied
:
168 return "Requested Range Not Satisfiable";
171 case Http::scExpectationFailed
:
172 return "Expectation Failed";
175 case Http::scUnprocessableEntity
:
176 return "Unprocessable Entity";
183 case Http::scFailedDependency
:
184 return "Failed Dependency";
187 case Http::scUpgradeRequired
:
188 return "Upgrade Required";
191 case Http::scPreconditionRequired
:
192 return "Precondition Required";
195 case Http::scTooManyRequests
:
196 return "Too Many Requests";
199 case Http::scRequestHeaderFieldsTooLarge
:
200 return "Request Header Fields Too Large";
204 case Http::scInternalServerError
:
205 return "Internal Server Error";
208 case Http::scNotImplemented
:
209 return "Not Implemented";
212 case Http::scBadGateway
:
213 return "Bad Gateway";
216 case Http::scServiceUnavailable
:
217 return "Service Unavailable";
220 case Http::scGatewayTimeout
:
221 return "Gateway Timeout";
224 case Http::scHttpVersionNotSupported
:
225 return "HTTP Version not supported";
228 case Http::scVariantAlsoNegotiates
:
229 return "Variant Also Negotiates";
232 case Http::scInsufficientStorage
:
233 return "Insufficient Storage";
236 case Http::scLoopDetected
:
237 return "Loop Detected";
240 case Http::scNotExtended
:
241 return "Not Extended";
244 case Http::scNetworkAuthenticationRequired
:
245 return "Network Authentication Required";
249 case Http::scInvalidHeader
:
250 case Http::scHeaderTooLarge
:
251 // fall through to default.
254 debugs(57, 3, "Unassigned HTTP status code: " << status
);