diff --git a/src/http/Status.cxx b/src/http/Status.cxx index 99cac9697..5ec0ff473 100644 --- a/src/http/Status.cxx +++ b/src/http/Status.cxx @@ -10,6 +10,8 @@ static constexpr struct { } http_status_to_string_input[] = { { HttpStatus::CONTINUE, "100 Continue" }, { HttpStatus::SWITCHING_PROTOCOLS, "101 Switching Protocols" }, + { HttpStatus::PROCESSING, "102 Processing"}, + { HttpStatus::EARLY_HINTS, "103 Early Hints"}, { HttpStatus::OK, "200 OK" }, { HttpStatus::CREATED, "201 Created" }, { HttpStatus::ACCEPTED, "202 Accepted" }, @@ -19,6 +21,8 @@ static constexpr struct { { HttpStatus::RESET_CONTENT, "205 Reset Content" }, { HttpStatus::PARTIAL_CONTENT, "206 Partial Content" }, { HttpStatus::MULTI_STATUS, "207 Multi-Status" }, + { HttpStatus::ALREADY_REPORTED, "208 Already Reported"}, + { HttpStatus::IM_USED, "226 IM Used"}, { HttpStatus::MULTIPLE_CHOICES, "300 Multiple Choices" }, { HttpStatus::MOVED_PERMANENTLY, "301 Moved Permanently" }, { HttpStatus::FOUND, "302 Found" }, @@ -26,6 +30,7 @@ static constexpr struct { { HttpStatus::NOT_MODIFIED, "304 Not Modified" }, { HttpStatus::USE_PROXY, "305 Use Proxy" }, { HttpStatus::TEMPORARY_REDIRECT, "307 Temporary Redirect" }, + { HttpStatus::PERMANENT_REDIRECT, "308 Permanent Redirect"}, { HttpStatus::BAD_REQUEST, "400 Bad Request" }, { HttpStatus::UNAUTHORIZED, "401 Unauthorized" }, { HttpStatus::PAYMENT_REQUIRED, "402 Payment Required" }, @@ -48,9 +53,11 @@ static constexpr struct { "416 Requested Range Not Satisfiable" }, { HttpStatus::EXPECTATION_FAILED, "417 Expectation failed" }, { HttpStatus::I_M_A_TEAPOT, "418 I'm a teapot" }, + { HttpStatus::MISDIRECTED_REQUEST, "421 Misdirected Request"}, { HttpStatus::UNPROCESSABLE_ENTITY, "422 Unprocessable Entity" }, { HttpStatus::LOCKED, "423 Locked" }, { HttpStatus::FAILED_DEPENDENCY, "424 Failed Dependency" }, + { HttpStatus::TOO_EARLY, "425 Too Early"}, { HttpStatus::UPGRADE_REQUIRED, "426 Upgrade Required" }, { HttpStatus::PRECONDITION_REQUIRED, "428 Precondition Required" }, { HttpStatus::TOO_MANY_REQUESTS, "429 Too Many Requests" }, @@ -65,7 +72,10 @@ static constexpr struct { { HttpStatus::GATEWAY_TIMEOUT, "504 Gateway Timeout" }, { HttpStatus::HTTP_VERSION_NOT_SUPPORTED, "505 HTTP Version Not Supported" }, + { HttpStatus::VARIANT_ALSO_NEGOTIATES, "506 Variant Also Negotiates" }, { HttpStatus::INSUFFICIENT_STORAGE, "507 Insufficient Storage" }, + { HttpStatus::LOOP_DETECTED, "508 Loop Detected"}, + { HttpStatus::NOT_EXTENDED, "510 Not Extended"}, { HttpStatus::NETWORK_AUTHENTICATION_REQUIRED, "511 Network Authentication Required" }, }; diff --git a/src/http/Status.hxx b/src/http/Status.hxx index 954fa98a1..8cf76beb4 100644 --- a/src/http/Status.hxx +++ b/src/http/Status.hxx @@ -19,6 +19,12 @@ enum class HttpStatus : uint_least16_t { CONTINUE = 100, SWITCHING_PROTOCOLS = 101, + // added in RFC 2518, removed in RFC 4918 (WebDAV) + PROCESSING = 102, + + // added in RFC 2518, removed in RFC 4918 (WebDAV) + EARLY_HINTS = 103, + OK = 200, CREATED = 201, ACCEPTED = 202, @@ -32,13 +38,24 @@ enum class HttpStatus : uint_least16_t { */ MULTI_STATUS = 207, + /** + * @see RFC 5842 (Binding Extensiosn to WebDAV) + */ + ALREADY_REPORTED = 208, + + /** + * @see RFC 3229 (Delta Encoding in HTTP) + */ + IM_USED = 226, + MULTIPLE_CHOICES = 300, MOVED_PERMANENTLY = 301, FOUND = 302, SEE_OTHER = 303, NOT_MODIFIED = 304, - USE_PROXY = 305, + USE_PROXY = 305, // deprecated in RFC 7231 TEMPORARY_REDIRECT = 307, + PERMANENT_REDIRECT = 308, // RFC 9110 (HTTP Semantics) BAD_REQUEST = 400, UNAUTHORIZED = 401, PAYMENT_REQUIRED = 402, @@ -63,6 +80,11 @@ enum class HttpStatus : uint_least16_t { */ I_M_A_TEAPOT = 418, + /** + * @see RFC 9110 (HTTP Semantics) + */ + MISDIRECTED_REQUEST = 421, + /** * @see RFC 4918 (WebDAV) */ @@ -78,6 +100,11 @@ enum class HttpStatus : uint_least16_t { */ FAILED_DEPENDENCY = 424, + /** + * @see RFC 8470 (Using Early Data in HTTP) + */ + TOO_EARLY = 425, + /** * @see RFC 7231 (HTTP 1.1) */ @@ -110,11 +137,26 @@ enum class HttpStatus : uint_least16_t { GATEWAY_TIMEOUT = 504, HTTP_VERSION_NOT_SUPPORTED = 505, + /** + * @see RFC 2295 (Transparent Content Negotiation in HTTP) + */ + VARIANT_ALSO_NEGOTIATES = 506, + /** * @see RFC 4918 (WebDAV) */ INSUFFICIENT_STORAGE = 507, + /** + * @see RFC 5842 (Binding Extensions to WebDAV) + */ + LOOP_DETECTED = 508, + + /** + * @see RFC 2774 (An HTTP Extension Framework) + */ + NOT_EXTENDED = 510, + /** * @see RFC 6585 (Additional HTTP Status Codes) */