Skip to content

Commit 403f659

Browse files
committed
Added all HTTP status codes
Added all the missing HTTP v1.1 status codes and corrected the naming to the standard of some of the existing ones.
1 parent 72ee36e commit 403f659

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

boost/network/protocol/http/impl/response.ipp

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,32 +29,59 @@ namespace boost { namespace network { namespace http {
2929
typedef tags::http_server tag;
3030
typedef response_header<tags::http_server>::type header_type;
3131

32-
/// The status of the reply.
32+
/*! The status of the reply. Represent all the status codes of HTTP v1.1
33+
* from http://tools.ietf.org/html/rfc2616#page-39 and
34+
* http://tools.ietf.org/html/rfc6585
35+
*/
3336
enum status_type {
37+
continue_http = 100,
38+
switching_protocols = 101,
3439
ok = 200,
3540
created = 201,
3641
accepted = 202,
42+
non_authoritative_information = 203,
3743
no_content = 204,
44+
reset_content = 205,
3845
partial_content = 206,
3946
multiple_choices = 300,
4047
moved_permanently = 301,
41-
moved_temporarily = 302,
48+
found = 302,
49+
see_other = 303,
4250
not_modified = 304,
51+
use_proxy = 305,
52+
temporary_redirect = 307,
4353
bad_request = 400,
4454
unauthorized = 401,
4555
forbidden = 403,
56+
payment_required = 402,
57+
forbidden = 403,
4658
not_found = 404,
47-
not_supported = 405,
59+
method_not_allowed = 405,
4860
not_acceptable = 406,
61+
proxy_authentication_required = 407,
4962
request_timeout = 408,
63+
conflict = 409,
64+
gone = 410,
65+
length_required = 411,
5066
precondition_failed = 412,
51-
unsatisfiable_range = 416,
67+
request_entity_too_large = 413,
68+
request_uri_too_large = 414,
69+
unsupported_media_type = 415,
70+
requested_range_not_satisfiable = 416,
71+
expectation_failed = 417,
72+
precondition_required = 428,
73+
too_many_requests = 429,
74+
request_header_fields_too_large = 431,
5275
internal_server_error = 500,
5376
not_implemented = 501,
5477
bad_gateway = 502,
5578
service_unavailable = 503,
56-
space_unavailable = 507
79+
gateway_timeout = 504,
80+
http_version_not_supported = 505,
81+
space_unavailable = 507,
82+
network_authentication_required = 511
5783
} status;
84+
5885

5986
/// The headers to be included in the reply.
6087
typedef vector<tags::http_server>::apply<header_type>::type headers_vector;

0 commit comments

Comments
 (0)