]> git.ipfire.org Git - thirdparty/squid.git/blob - src/http/StatusCode.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / http / StatusCode.h
1 /*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef _SQUID_SRC_HTTP_STATUSCODE_H
10 #define _SQUID_SRC_HTTP_STATUSCODE_H
11
12 namespace Http
13 {
14
15 /**
16 * These basic HTTP reply status codes are defined by RFC 2616 unless otherwise stated.
17 * The IANA registry for HTTP status codes can be found at:
18 * http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
19 */
20 typedef enum {
21 scNone = 0,
22 scContinue = 100,
23 scSwitchingProtocols = 101,
24 scProcessing = 102, /**< RFC2518 section 10.1 */
25 scOkay = 200,
26 scCreated = 201,
27 scAccepted = 202,
28 scNonAuthoritativeInformation = 203,
29 scNoContent = 204,
30 scResetContent = 205,
31 scPartialContent = 206,
32 scMultiStatus = 207, /**< RFC2518 section 10.2 / RFC4918 */
33 scAlreadyReported = 208, /**< RFC5842 */
34 scImUsed = 226, /**< RFC3229 */
35 scMultipleChoices = 300,
36 scMovedPermanently = 301,
37 scFound = 302,
38 scSeeOther = 303,
39 scNotModified = 304,
40 scUseProxy = 305,
41 scTemporaryRedirect = 307,
42 scPermanentRedirect = 308, /**< RFC7238 */
43 scBadRequest = 400,
44 scUnauthorized = 401,
45 scPaymentRequired = 402,
46 scForbidden = 403,
47 scNotFound = 404,
48 scMethodNotAllowed = 405,
49 scNotAcceptable = 406,
50 scProxyAuthenticationRequired = 407,
51 scRequestTimeout = 408,
52 scConflict = 409,
53 scGone = 410,
54 scLengthRequired = 411,
55 scPreconditionFailed = 412,
56 scPayloadTooLarge = 413,
57 scUriTooLong = 414,
58 scUnsupportedMediaType = 415,
59 scRequestedRangeNotSatisfied = 416,
60 scExpectationFailed = 417,
61 scMisdirectedRequest = 421, /**< draft-ietf-httpbis-http2-16 section 9.1.2 */
62 scUnprocessableEntity = 422, /**< RFC2518 section 10.3 / RFC4918 */
63 scLocked = 423, /**< RFC2518 section 10.4 / RFC4918 */
64 scFailedDependency = 424, /**< RFC2518 section 10.5 / RFC4918 */
65 scUpgradeRequired = 426,
66 scPreconditionRequired = 428, /**< RFC6585 */
67 scTooManyRequests = 429, /**< RFC6585 */
68 scRequestHeaderFieldsTooLarge = 431, /**< RFC6585 */
69 scInternalServerError = 500,
70 scNotImplemented = 501,
71 scBadGateway = 502,
72 scServiceUnavailable = 503,
73 scGatewayTimeout = 504,
74 scHttpVersionNotSupported = 505,
75 scVariantAlsoNegotiates = 506, /**< RFC2295 */
76 scInsufficientStorage = 507, /**< RFC2518 section 10.6 / RFC4918 */
77 scLoopDetected = 508, /**< RFC5842 */
78 scNotExtended = 510, /**< RFC2774 */
79 scNetworkAuthenticationRequired = 511, /**< RFC6585 */
80
81 // The 6xx codes below are for internal use only: Bad requests result
82 // in scBadRequest; bad responses in scGatewayTimeout.
83
84 scInvalidHeader = 600, /**< Squid header parsing error */
85 scHeaderTooLarge = 601 /* Header too large to process */
86 } StatusCode;
87
88 const char *StatusCodeString(const Http::StatusCode status);
89
90 } // namespace Http
91
92 #endif /* _SQUID_SRC_HTTP_STATUSCODE_H */
93