MySQL 9.1.0
Source Code Documentation
status_code.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2021, 2024, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef ROUTER_SRC_HTTP_INCLUDE_HTTP_BASE_STATUS_CODE_H_
27#define ROUTER_SRC_HTTP_INCLUDE_HTTP_BASE_STATUS_CODE_H_
28
30
31namespace http {
32namespace base {
33namespace status_code {
34
35using name_type = const char *;
36using key_type = int;
37
38// https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
39constexpr key_type Continue = 100; // RFC 7231
40constexpr key_type SwitchingProtocols = 101; // RFC 7231
41constexpr key_type Processing = 102; // RFC 2518
42constexpr key_type EarlyHints = 103; // RFC 8297
43
44constexpr key_type Ok = 200; // RFC 7231
45constexpr key_type Created = 201; // RFC 7231
46constexpr key_type Accepted = 202; // RFC 7231
47constexpr key_type NonAuthoritiveInformation = 203; // RFC 7231
48constexpr key_type NoContent = 204; // RFC 7231
49constexpr key_type ResetContent = 205; // RFC 7231
50constexpr key_type PartialContent = 206; // RFC 7233
51constexpr key_type MultiStatus = 207; // RFC 4918
52constexpr key_type AlreadyReported = 208; // RFC 5842
53constexpr key_type InstanceManipulationUsed = 226; // RFC 3229
54
55constexpr key_type MultipleChoices = 300; // RFC 7231
56constexpr key_type MovedPermanently = 301; // RFC 7231
57constexpr key_type Found = 302; // RFC 7231
58constexpr key_type SeeOther = 303; // RFC 7231
59constexpr key_type NotModified = 304; // RFC 7232
60constexpr key_type UseProxy = 305; // RFC 7231
61constexpr key_type TemporaryRedirect = 307; // RFC 7231
62constexpr key_type PermanentRedirect = 308; // RFC 7538
63
64constexpr key_type BadRequest = 400; // RFC 7231
65constexpr key_type Unauthorized = 401; // RFC 7235
66constexpr key_type PaymentRequired = 402; // RFC 7231
67constexpr key_type Forbidden = 403; // RFC 7231
68constexpr key_type NotFound = 404; // RFC 7231
69constexpr key_type MethodNotAllowed = 405; // RFC 7231
70constexpr key_type NotAcceptable = 406; // RFC 7231
71constexpr key_type ProxyAuthenticationRequired = 407; // RFC 7235
72constexpr key_type RequestTimeout = 408; // RFC 7231
73constexpr key_type Conflicts = 409; // RFC 7231
74constexpr key_type Gone = 410; // RFC 7231
75constexpr key_type LengthRequired = 411; // RFC 7231
76constexpr key_type PreconditionFailed = 412; // RFC 7232
77constexpr key_type PayloadTooLarge = 413; // RFC 7231
78constexpr key_type URITooLarge = 414; // RFC 7231
79constexpr key_type UnsupportedMediaType = 415; // RFC 7231
80constexpr key_type RangeNotSatisfiable = 416; // RFC 7233
81constexpr key_type ExpectationFailed = 417; // RFC 7231
82constexpr key_type IamaTeapot = 418; // RFC 7168
83constexpr key_type MisdirectedRequest = 421; // RFC 7540
84constexpr key_type UnprocessableEntity = 422; // RFC 4918
85constexpr key_type Locked = 423; // RFC 4918
86constexpr key_type FailedDependency = 424; // RFC 4918
87constexpr key_type UpgradeRequired = 426; // RFC 7231
88constexpr key_type PreconditionRequired = 428; // RFC 6585
89constexpr key_type TooManyRequests = 429; // RFC 6585
90constexpr key_type RequestHeaderFieldsTooLarge = 431; // RFC 6585
91constexpr key_type UnavailableForLegalReasons = 451; // RFC 7725
92
93constexpr key_type InternalError = 500; // RFC 7231
94constexpr key_type NotImplemented = 501; // RFC 7231
95constexpr key_type BadGateway = 502; // RFC 7231
96constexpr key_type ServiceUnavailable = 503; // RFC 7231
97constexpr key_type GatewayTimeout = 504; // RFC 7231
98constexpr key_type HTTPVersionNotSupported = 505; // RFC 7231
99constexpr key_type VariantAlsoNegotiates = 506; // RFC 2295
100constexpr key_type InsufficientStorage = 507; // RFC 4918
101constexpr key_type LoopDetected = 508; // RFC 5842
102constexpr key_type NotExtended = 510; // RFC 2774
103constexpr key_type NetworkAuthorizationRequired = 511; // RFC 6585
104
106
107} // namespace status_code
108} // namespace base
109} // namespace http
110
111namespace HttpStatusCode {
112using namespace http::base::status_code;
113
116}
117
118} // namespace HttpStatusCode
119
120#endif // ROUTER_SRC_HTTP_INCLUDE_HTTP_BASE_STATUS_CODE_H_
#define HTTP_COMMON_EXPORT
Definition: http_common_export.h:15
Definition: status_code.h:111
auto get_default_status_text(key_type status)
Definition: status_code.h:114
Definition: status_code.h:33
int key_type
Definition: status_code.h:36
constexpr key_type PayloadTooLarge
Definition: status_code.h:77
constexpr key_type Forbidden
Definition: status_code.h:67
constexpr key_type NoContent
Definition: status_code.h:48
constexpr key_type InternalError
Definition: status_code.h:93
constexpr key_type UnavailableForLegalReasons
Definition: status_code.h:91
constexpr key_type URITooLarge
Definition: status_code.h:78
constexpr key_type HTTPVersionNotSupported
Definition: status_code.h:98
constexpr key_type PaymentRequired
Definition: status_code.h:66
constexpr key_type BadGateway
Definition: status_code.h:95
constexpr key_type PreconditionFailed
Definition: status_code.h:76
constexpr key_type InsufficientStorage
Definition: status_code.h:100
constexpr key_type UseProxy
Definition: status_code.h:60
constexpr key_type AlreadyReported
Definition: status_code.h:52
constexpr key_type Gone
Definition: status_code.h:74
constexpr key_type MethodNotAllowed
Definition: status_code.h:69
constexpr key_type RequestTimeout
Definition: status_code.h:72
constexpr key_type ServiceUnavailable
Definition: status_code.h:96
constexpr key_type Unauthorized
Definition: status_code.h:65
constexpr key_type GatewayTimeout
Definition: status_code.h:97
constexpr key_type PartialContent
Definition: status_code.h:50
constexpr key_type Created
Definition: status_code.h:45
constexpr key_type ResetContent
Definition: status_code.h:49
const char * name_type
Definition: status_code.h:35
constexpr key_type Accepted
Definition: status_code.h:46
constexpr key_type ProxyAuthenticationRequired
Definition: status_code.h:71
constexpr key_type LengthRequired
Definition: status_code.h:75
constexpr key_type PreconditionRequired
Definition: status_code.h:88
constexpr key_type NotModified
Definition: status_code.h:59
constexpr key_type SwitchingProtocols
Definition: status_code.h:40
constexpr key_type TemporaryRedirect
Definition: status_code.h:61
constexpr key_type MovedPermanently
Definition: status_code.h:56
constexpr key_type MisdirectedRequest
Definition: status_code.h:83
constexpr key_type TooManyRequests
Definition: status_code.h:89
constexpr key_type IamaTeapot
Definition: status_code.h:82
constexpr key_type MultipleChoices
Definition: status_code.h:55
constexpr key_type NotImplemented
Definition: status_code.h:94
constexpr key_type InstanceManipulationUsed
Definition: status_code.h:53
constexpr key_type LoopDetected
Definition: status_code.h:101
constexpr key_type SeeOther
Definition: status_code.h:58
constexpr key_type UnsupportedMediaType
Definition: status_code.h:79
constexpr key_type UpgradeRequired
Definition: status_code.h:87
constexpr key_type RequestHeaderFieldsTooLarge
Definition: status_code.h:90
constexpr key_type UnprocessableEntity
Definition: status_code.h:84
constexpr key_type NotExtended
Definition: status_code.h:102
constexpr key_type NotFound
Definition: status_code.h:68
constexpr key_type ExpectationFailed
Definition: status_code.h:81
constexpr key_type Found
Definition: status_code.h:57
constexpr key_type BadRequest
Definition: status_code.h:64
constexpr key_type MultiStatus
Definition: status_code.h:51
constexpr key_type Continue
Definition: status_code.h:39
constexpr key_type NonAuthoritiveInformation
Definition: status_code.h:47
constexpr key_type RangeNotSatisfiable
Definition: status_code.h:80
constexpr key_type Locked
Definition: status_code.h:85
constexpr key_type Ok
Definition: status_code.h:44
constexpr key_type FailedDependency
Definition: status_code.h:86
constexpr key_type PermanentRedirect
Definition: status_code.h:62
HTTP_COMMON_EXPORT name_type to_string(key_type key)
Definition: status_code.cc:35
constexpr key_type NotAcceptable
Definition: status_code.h:70
constexpr key_type Processing
Definition: status_code.h:41
constexpr key_type NetworkAuthorizationRequired
Definition: status_code.h:103
constexpr key_type VariantAlsoNegotiates
Definition: status_code.h:99
constexpr key_type EarlyHints
Definition: status_code.h:42
constexpr key_type Conflicts
Definition: status_code.h:73
Definition: connection.h:56
required string key
Definition: replication_asynchronous_connection_failover.proto:60
required uint32 status
Definition: replication_asynchronous_connection_failover.proto:61