Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0739a4a

Browse files
committed
Added some new HTTP status codes.
1 parent0c85833 commit0739a4a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎http/src/network/http/v2/status.hpp‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
/**
1010
* \file
1111
* \brief Constants for the HTTP error status.
12+
*
13+
* http://tools.ietf.org/html/rfc6585
14+
* http://httpstatus.es/
1215
*/
1316

1417
#include<string>
@@ -61,6 +64,9 @@ namespace network {
6164
UNSUPPORTED_MEDIA_TYPE =415,
6265
REQUEST_RANGE_NOT_SATISFIABLE =416,
6366
EXPECTATION_FAILED =417,
67+
PRECONDITION_REQUIRED =428,
68+
TOO_MANY_REQUESTS =429,
69+
REQUEST_HEADER_FIELDS_TOO_LARGE =431,
6470

6571
// server error
6672
INTERNAL_ERROR =500,
@@ -69,6 +75,7 @@ namespace network {
6975
SERVICE_UNAVAILABLE =503,
7076
GATEWAY_TIMEOUT =504,
7177
HTTP_VERSION_NOT_SUPPORTED =505,
78+
NETWORK_AUTHENTICATION_REQUIRED =511,
7279
};
7380
}// namespace status
7481
}// namespace v2
@@ -126,12 +133,16 @@ namespace network {
126133
{code::UNSUPPORTED_MEDIA_TYPE,"Unsupported Media Type"},
127134
{code::REQUEST_RANGE_NOT_SATISFIABLE,"Request Range Not Satisfiable"},
128135
{code::EXPECTATION_FAILED,"Expectation Failed"},
136+
{code::PRECONDITION_REQUIRED,"Precondition Required"},
137+
{code::TOO_MANY_REQUESTS,"Too Many Requests"},
138+
{code::REQUEST_HEADER_FIELDS_TOO_LARGE,"Request Header Fields Too Large"},
129139
{code::INTERNAL_ERROR,"Internal Error"},
130140
{code::NOT_IMPLEMENTED,"Not Implemented"},
131141
{code::BAD_GATEWAY,"Bad Gateway"},
132142
{code::SERVICE_UNAVAILABLE,"Service Unavailable"},
133143
{code::GATEWAY_TIMEOUT,"Gateway Timeout"},
134144
{code::HTTP_VERSION_NOT_SUPPORTED,"HTTP Version Not Supported"},
145+
{code::NETWORK_AUTHENTICATION_REQUIRED,"Network Authentication Required"},
135146
};
136147

137148
auto it = status_messages.find(status_code);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp