fix(HTTPResponse): Add 425 / HTTP_TOO_EARLY to HTTPResponse::HTTPStatus #3592

This commit is contained in:
Alex Fabijanic 2022-05-29 23:09:06 -05:00
parent e25a8b3ec7
commit 1a662a113c
2 changed files with 5 additions and 0 deletions

View File

@ -93,6 +93,7 @@ public:
HTTP_UNPROCESSABLE_ENTITY = 422, HTTP_UNPROCESSABLE_ENTITY = 422,
HTTP_LOCKED = 423, HTTP_LOCKED = 423,
HTTP_FAILED_DEPENDENCY = 424, HTTP_FAILED_DEPENDENCY = 424,
HTTP_TOO_EARLY = 425,
HTTP_UPGRADE_REQUIRED = 426, HTTP_UPGRADE_REQUIRED = 426,
HTTP_PRECONDITION_REQUIRED = 428, HTTP_PRECONDITION_REQUIRED = 428,
HTTP_TOO_MANY_REQUESTS = 429, HTTP_TOO_MANY_REQUESTS = 429,
@ -243,6 +244,7 @@ public:
static const std::string HTTP_REASON_UNPROCESSABLE_ENTITY; static const std::string HTTP_REASON_UNPROCESSABLE_ENTITY;
static const std::string HTTP_REASON_LOCKED; static const std::string HTTP_REASON_LOCKED;
static const std::string HTTP_REASON_FAILED_DEPENDENCY; static const std::string HTTP_REASON_FAILED_DEPENDENCY;
static const std::string HTTP_REASON_TOO_EARLY;
static const std::string HTTP_REASON_UPGRADE_REQUIRED; static const std::string HTTP_REASON_UPGRADE_REQUIRED;
static const std::string HTTP_REASON_PRECONDITION_REQUIRED; static const std::string HTTP_REASON_PRECONDITION_REQUIRED;
static const std::string HTTP_REASON_TOO_MANY_REQUESTS; static const std::string HTTP_REASON_TOO_MANY_REQUESTS;

View File

@ -81,6 +81,7 @@ const std::string HTTPResponse::HTTP_REASON_MISDIRECTED_REQUEST = "M
const std::string HTTPResponse::HTTP_REASON_UNPROCESSABLE_ENTITY = "Unprocessable Entity"; const std::string HTTPResponse::HTTP_REASON_UNPROCESSABLE_ENTITY = "Unprocessable Entity";
const std::string HTTPResponse::HTTP_REASON_LOCKED = "Locked"; const std::string HTTPResponse::HTTP_REASON_LOCKED = "Locked";
const std::string HTTPResponse::HTTP_REASON_FAILED_DEPENDENCY = "Failed Dependency"; const std::string HTTPResponse::HTTP_REASON_FAILED_DEPENDENCY = "Failed Dependency";
const std::string HTTPResponse::HTTP_REASON_TOO_EARLY = "Too Early";
const std::string HTTPResponse::HTTP_REASON_UPGRADE_REQUIRED = "Upgrade Required"; const std::string HTTPResponse::HTTP_REASON_UPGRADE_REQUIRED = "Upgrade Required";
const std::string HTTPResponse::HTTP_REASON_PRECONDITION_REQUIRED = "Precondition Required"; const std::string HTTPResponse::HTTP_REASON_PRECONDITION_REQUIRED = "Precondition Required";
const std::string HTTPResponse::HTTP_REASON_TOO_MANY_REQUESTS = "Too Many Requests"; const std::string HTTPResponse::HTTP_REASON_TOO_MANY_REQUESTS = "Too Many Requests";
@ -363,6 +364,8 @@ const std::string& HTTPResponse::getReasonForStatus(HTTPStatus status)
return HTTP_REASON_LOCKED; return HTTP_REASON_LOCKED;
case HTTP_FAILED_DEPENDENCY: case HTTP_FAILED_DEPENDENCY:
return HTTP_REASON_FAILED_DEPENDENCY; return HTTP_REASON_FAILED_DEPENDENCY;
case HTTP_TOO_EARLY:
return HTTP_REASON_TOO_EARLY;
case HTTP_UPGRADE_REQUIRED: case HTTP_UPGRADE_REQUIRED:
return HTTP_REASON_UPGRADE_REQUIRED; return HTTP_REASON_UPGRADE_REQUIRED;
case HTTP_PRECONDITION_REQUIRED: case HTTP_PRECONDITION_REQUIRED: