3 #include "http/StatusCode.h"
6 Http::StatusCodeString(const Http::StatusCode status
)
11 return "Init"; /* we init .status with code 0 */
14 case Http::scContinue
:
18 case Http::scSwitchingProtocols
:
19 return "Switching Protocols";
30 case Http::scAccepted
:
34 case Http::scNonAuthoritativeInformation
:
35 return "Non-Authoritative Information";
38 case Http::scNoContent
:
42 case Http::scResetContent
:
43 return "Reset Content";
46 case Http::scPartialContent
:
47 return "Partial Content";
50 case Http::scMultiStatus
:
51 return "Multi-Status";
54 case Http::scMultipleChoices
:
55 return "Multiple Choices";
58 case Http::scMovedPermanently
:
59 return "Moved Permanently";
62 case Http::scMovedTemporarily
:
63 return "Moved Temporarily";
66 case Http::scSeeOther
:
70 case Http::scNotModified
:
71 return "Not Modified";
74 case Http::scUseProxy
:
78 case Http::scTemporaryRedirect
:
79 return "Temporary Redirect";
82 case Http::scPermanentRedirect
:
83 return "Permanent Redirect";
86 case Http::scBadRequest
:
90 case Http::scUnauthorized
:
91 return "Unauthorized";
94 case Http::scPaymentRequired
:
95 return "Payment Required";
98 case Http::scForbidden
:
102 case Http::scNotFound
:
106 case Http::scMethodNotAllowed
:
107 return "Method Not Allowed";
110 case Http::scNotAcceptable
:
111 return "Not Acceptable";
114 case Http::scProxyAuthenticationRequired
:
115 return "Proxy Authentication Required";
118 case Http::scRequestTimeout
:
119 return "Request Time-out";
122 case Http::scConflict
:
130 case Http::scLengthRequired
:
131 return "Length Required";
134 case Http::scPreconditionFailed
:
135 return "Precondition Failed";
138 case Http::scRequestEntityTooLarge
:
139 return "Request Entity Too Large";
142 case Http::scRequestUriTooLarge
:
143 return "Request-URI Too Large";
146 case Http::scUnsupportedMediaType
:
147 return "Unsupported Media Type";
150 case Http::scRequestedRangeNotSatisfied
:
151 return "Requested Range Not Satisfiable";
154 case Http::scExpectationFailed
:
155 return "Expectation Failed";
158 case Http::scInternalServerError
:
159 return "Internal Server Error";
162 case Http::scNotImplemented
:
163 return "Not Implemented";
166 case Http::scBadGateway
:
167 return "Bad Gateway";
170 case Http::scServiceUnavailable
:
171 return "Service Unavailable";
174 case Http::scGateway_Timeout
:
175 return "Gateway Time-out";
178 case Http::scHttpVersionNotSupported
:
179 return "HTTP Version not supported";
183 case Http::scPreconditionRequired
: // 428
184 return "Precondition Required";
187 case Http::scTooManyFields
: // 429
188 return "Too Many Requests";
191 case Http::scRequestHeaderFieldsTooLarge
: // 431
192 return "Request Header Fields Too Large";
195 case Http::scNetworkAuthenticationRequired
: // 511
196 return "Network Authentication Required";
200 debugs(57, 3, "Unknown HTTP status code: " << status
);