add a 422 Header status - Unprocessable Entity

This commit is contained in:
Tomasz Sowa 2023-11-08 17:59:40 +01:00
parent bcde5c628a
commit a54d70bed4
Signed by: tomasz.sowa
GPG Key ID: 662CC1438638588B
2 changed files with 16 additions and 13 deletions

View File

@ -950,7 +950,7 @@ void App::Start()
log << log2 << "App: requests queue exceeded limit of " << config.request_queue_job_limit
<< " requests (skipping this request)" << logend;
cur.request->http_status = Header::status_503_service_unavailale;
cur.request->http_status = Header::status_503_service_unavailable;
cur.request->FinishRequest();
do_process_request = false;

View File

@ -114,8 +114,9 @@ public:
static const int status_403_forbidden = 403;
static const int status_404_not_found = 404;
static const int status_414_uri_too_long = 414;
static const int status_422_unprocessable_entity = 422;
static const int status_500_internal_server_error = 500;
static const int status_503_service_unavailale = 503;
static const int status_503_service_unavailable = 503;
static constexpr const wchar_t * str_status_200 = L"OK";
@ -130,6 +131,7 @@ public:
static constexpr const wchar_t * str_status_403 = L"Forbidden";
static constexpr const wchar_t * str_status_404 = L"Not Found";
static constexpr const wchar_t * str_status_414 = L"URI Too Long";
static constexpr const wchar_t * str_status_422 = L"Unprocessable Entity";
static constexpr const wchar_t * str_status_500 = L"Internal Server Error";
static constexpr const wchar_t * str_status_503 = L"Service Unavailable";
@ -163,8 +165,9 @@ protected:
{status_403_forbidden, str_status_403},
{status_404_not_found, str_status_404},
{status_414_uri_too_long, str_status_414},
{status_422_unprocessable_entity, str_status_422},
{status_500_internal_server_error, str_status_500},
{status_503_service_unavailale, str_status_503},
{status_503_service_unavailable, str_status_503},
};
};