diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/http/misc/httpcodes.cpp | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http/misc/httpcodes.cpp')
-rw-r--r-- | library/cpp/http/misc/httpcodes.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/library/cpp/http/misc/httpcodes.cpp b/library/cpp/http/misc/httpcodes.cpp index fb9e43c9d3..ad8c80ac1e 100644 --- a/library/cpp/http/misc/httpcodes.cpp +++ b/library/cpp/http/misc/httpcodes.cpp @@ -2,26 +2,26 @@ TStringBuf HttpCodeStrEx(int code) noexcept { switch (code) { - case HTTP_CONTINUE: + case HTTP_CONTINUE: return TStringBuf("100 Continue"); - case HTTP_SWITCHING_PROTOCOLS: + case HTTP_SWITCHING_PROTOCOLS: return TStringBuf("101 Switching protocols"); case HTTP_PROCESSING: return TStringBuf("102 Processing"); - - case HTTP_OK: + + case HTTP_OK: return TStringBuf("200 Ok"); - case HTTP_CREATED: + case HTTP_CREATED: return TStringBuf("201 Created"); - case HTTP_ACCEPTED: + case HTTP_ACCEPTED: return TStringBuf("202 Accepted"); - case HTTP_NON_AUTHORITATIVE_INFORMATION: + case HTTP_NON_AUTHORITATIVE_INFORMATION: return TStringBuf("203 None authoritative information"); - case HTTP_NO_CONTENT: + case HTTP_NO_CONTENT: return TStringBuf("204 No content"); - case HTTP_RESET_CONTENT: + case HTTP_RESET_CONTENT: return TStringBuf("205 Reset content"); - case HTTP_PARTIAL_CONTENT: + case HTTP_PARTIAL_CONTENT: return TStringBuf("206 Partial content"); case HTTP_MULTI_STATUS: return TStringBuf("207 Multi status"); @@ -30,58 +30,58 @@ TStringBuf HttpCodeStrEx(int code) noexcept { case HTTP_IM_USED: return TStringBuf("226 IM used"); - case HTTP_MULTIPLE_CHOICES: + case HTTP_MULTIPLE_CHOICES: return TStringBuf("300 Multiple choices"); - case HTTP_MOVED_PERMANENTLY: + case HTTP_MOVED_PERMANENTLY: return TStringBuf("301 Moved permanently"); - case HTTP_FOUND: + case HTTP_FOUND: return TStringBuf("302 Moved temporarily"); - case HTTP_SEE_OTHER: + case HTTP_SEE_OTHER: return TStringBuf("303 See other"); - case HTTP_NOT_MODIFIED: + case HTTP_NOT_MODIFIED: return TStringBuf("304 Not modified"); - case HTTP_USE_PROXY: + case HTTP_USE_PROXY: return TStringBuf("305 Use proxy"); - case HTTP_TEMPORARY_REDIRECT: + case HTTP_TEMPORARY_REDIRECT: return TStringBuf("307 Temporarily redirect"); case HTTP_PERMANENT_REDIRECT: return TStringBuf("308 Permanent redirect"); - case HTTP_BAD_REQUEST: + case HTTP_BAD_REQUEST: return TStringBuf("400 Bad request"); - case HTTP_UNAUTHORIZED: + case HTTP_UNAUTHORIZED: return TStringBuf("401 Unauthorized"); - case HTTP_PAYMENT_REQUIRED: + case HTTP_PAYMENT_REQUIRED: return TStringBuf("402 Payment required"); - case HTTP_FORBIDDEN: + case HTTP_FORBIDDEN: return TStringBuf("403 Forbidden"); - case HTTP_NOT_FOUND: + case HTTP_NOT_FOUND: return TStringBuf("404 Not found"); - case HTTP_METHOD_NOT_ALLOWED: + case HTTP_METHOD_NOT_ALLOWED: return TStringBuf("405 Method not allowed"); - case HTTP_NOT_ACCEPTABLE: + case HTTP_NOT_ACCEPTABLE: return TStringBuf("406 Not acceptable"); - case HTTP_PROXY_AUTHENTICATION_REQUIRED: + case HTTP_PROXY_AUTHENTICATION_REQUIRED: return TStringBuf("407 Proxy Authentication required"); - case HTTP_REQUEST_TIME_OUT: + case HTTP_REQUEST_TIME_OUT: return TStringBuf("408 Request time out"); - case HTTP_CONFLICT: + case HTTP_CONFLICT: return TStringBuf("409 Conflict"); - case HTTP_GONE: + case HTTP_GONE: return TStringBuf("410 Gone"); - case HTTP_LENGTH_REQUIRED: + case HTTP_LENGTH_REQUIRED: return TStringBuf("411 Length required"); - case HTTP_PRECONDITION_FAILED: + case HTTP_PRECONDITION_FAILED: return TStringBuf("412 Precondition failed"); - case HTTP_REQUEST_ENTITY_TOO_LARGE: + case HTTP_REQUEST_ENTITY_TOO_LARGE: return TStringBuf("413 Request entity too large"); - case HTTP_REQUEST_URI_TOO_LARGE: + case HTTP_REQUEST_URI_TOO_LARGE: return TStringBuf("414 Request uri too large"); - case HTTP_UNSUPPORTED_MEDIA_TYPE: + case HTTP_UNSUPPORTED_MEDIA_TYPE: return TStringBuf("415 Unsupported media type"); - case HTTP_REQUESTED_RANGE_NOT_SATISFIABLE: + case HTTP_REQUESTED_RANGE_NOT_SATISFIABLE: return TStringBuf("416 Requested Range Not Satisfiable"); - case HTTP_EXPECTATION_FAILED: + case HTTP_EXPECTATION_FAILED: return TStringBuf("417 Expectation Failed"); case HTTP_I_AM_A_TEAPOT: return TStringBuf("418 I Am A Teapot"); @@ -89,7 +89,7 @@ TStringBuf HttpCodeStrEx(int code) noexcept { return TStringBuf("419 Authentication Timeout"); case HTTP_MISDIRECTED_REQUEST: return TStringBuf("421 Misdirected Request"); - case HTTP_UNPROCESSABLE_ENTITY: + case HTTP_UNPROCESSABLE_ENTITY: return TStringBuf("422 Unprocessable Entity"); case HTTP_LOCKED: return TStringBuf("423 Locked"); @@ -101,24 +101,24 @@ TStringBuf HttpCodeStrEx(int code) noexcept { return TStringBuf("426 Upgrade Required"); case HTTP_PRECONDITION_REQUIRED: return TStringBuf("428 Precondition Required"); - case HTTP_TOO_MANY_REQUESTS: + case HTTP_TOO_MANY_REQUESTS: return TStringBuf("429 Too Many Requests"); case HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE: return TStringBuf("431 Request Header Fields Too Large"); case HTTP_UNAVAILABLE_FOR_LEGAL_REASONS: return TStringBuf("451 Unavailable For Legal Reason"); - case HTTP_INTERNAL_SERVER_ERROR: + case HTTP_INTERNAL_SERVER_ERROR: return TStringBuf("500 Internal server error"); - case HTTP_NOT_IMPLEMENTED: + case HTTP_NOT_IMPLEMENTED: return TStringBuf("501 Not implemented"); - case HTTP_BAD_GATEWAY: + case HTTP_BAD_GATEWAY: return TStringBuf("502 Bad gateway"); - case HTTP_SERVICE_UNAVAILABLE: + case HTTP_SERVICE_UNAVAILABLE: return TStringBuf("503 Service unavailable"); - case HTTP_GATEWAY_TIME_OUT: + case HTTP_GATEWAY_TIME_OUT: return TStringBuf("504 Gateway time out"); - case HTTP_HTTP_VERSION_NOT_SUPPORTED: + case HTTP_HTTP_VERSION_NOT_SUPPORTED: return TStringBuf("505 HTTP version not supported"); case HTTP_VARIANT_ALSO_NEGOTIATES: return TStringBuf("506 Variant also negotiates"); @@ -135,7 +135,7 @@ TStringBuf HttpCodeStrEx(int code) noexcept { case HTTP_UNASSIGNED_512: return TStringBuf("512 Unassigned"); - default: + default: return TStringBuf("000 Unknown HTTP code"); } } |