]> git.ipfire.org Git - thirdparty/squid.git/blob - src/http/StatusCode.h
Merged from parent (large-rock r12530 including trunk r12732; v3.3.3+).
[thirdparty/squid.git] / src / http / StatusCode.h
1 #ifndef _SQUID_SRC_HTTP_STATUSCODE_H
2 #define _SQUID_SRC_HTTP_STATUSCODE_H
3
4 namespace Http
5 {
6
7 /**
8 * These basic HTTP reply status codes are defined by RFC 2616 unless otherwise stated.
9 */
10 typedef enum {
11 scNone = 0,
12 scContinue = 100,
13 scSwitchingProtocols = 101,
14 scProcessing = 102, /**< RFC2518 section 10.1 */
15 scOkay = 200,
16 scCreated = 201,
17 scAccepted = 202,
18 scNonAuthoritativeInformation = 203,
19 scNoContent = 204,
20 scResetContent = 205,
21 scPartialContent = 206,
22 scMultiStatus = 207, /**< RFC2518 section 10.2 */
23 scMultipleChoices = 300,
24 scMovedPermanently = 301,
25 scMovedTemporarily = 302,
26 scSeeOther = 303,
27 scNotModified = 304,
28 scUseProxy = 305,
29 scTemporaryRedirect = 307,
30 scPermanentRedirect = 308,
31 scBadRequest = 400,
32 scUnauthorized = 401,
33 scPaymentRequired = 402,
34 scForbidden = 403,
35 scNotFound = 404,
36 scMethodNotAllowed = 405,
37 scNotAcceptable = 406,
38 scProxyAuthenticationRequired = 407,
39 scRequestTimeout = 408,
40 scConflict = 409,
41 scGone = 410,
42 scLengthRequired = 411,
43 scPreconditionFailed = 412,
44 scRequestEntityTooLarge = 413,
45 scRequestUriTooLarge = 414,
46 scUnsupportedMediaType = 415,
47 scRequestedRangeNotSatisfied = 416,
48 scExpectationFailed = 417,
49 scUnprocessableEntity = 422, /**< RFC2518 section 10.3 */
50 scLocked = 423, /**< RFC2518 section 10.4 */
51 scFailedDependency = 424, /**< RFC2518 section 10.5 */
52 scPreconditionRequired = 428, /**< RFC6585 */
53 scTooManyFields = 429, /**< RFC6585 */
54 scRequestHeaderFieldsTooLarge = 431, /**< RFC6585 */
55 scInternalServerError = 500,
56 scNotImplemented = 501,
57 scBadGateway = 502,
58 scServiceUnavailable = 503,
59 scGateway_Timeout = 504,
60 scHttpVersionNotSupported = 505,
61 scInsufficientStorage = 507, /**< RFC2518 section 10.6 */
62 scNetworkAuthenticationRequired = 511, /**< RFC6585 */
63
64 // The 6xx codes below are for internal use only: Bad requests result
65 // in scBadRequest; bad responses in scGateway_Timeout.
66
67 scInvalidHeader = 600, /**< Squid header parsing error */
68 scHeaderTooLarge = 601 /* Header too large to process */
69 } StatusCode;
70
71 const char *StatusCodeString(const Http::StatusCode status);
72
73 } // namespace Http
74
75 #endif /* _SQUID_SRC_HTTP_STATUSCODE_H */