From 96e049666e8ec6075419865b5e642804583655f4 Mon Sep 17 00:00:00 2001 From: ssams <6338356+ssams@users.noreply.github.com> Date: Fri, 19 Apr 2024 08:06:39 +0000 Subject: [PATCH] add HTTP status 406 --- docs/guides/routes.md | 1 + include/crow/common.h | 1 + include/crow/http_connection.h | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/guides/routes.md b/docs/guides/routes.md index 95593e26b..c1bfae6c7 100644 --- a/docs/guides/routes.md +++ b/docs/guides/routes.md @@ -125,6 +125,7 @@ Crow defines the following status codes: 403 Forbidden 404 Not Found 405 Method Not Allowed +406 Not Acceptable 407 Proxy Authentication Required 409 Conflict 410 Gone diff --git a/include/crow/common.h b/include/crow/common.h index 91a77cb29..8da94ae9c 100644 --- a/include/crow/common.h +++ b/include/crow/common.h @@ -190,6 +190,7 @@ namespace crow FORBIDDEN = 403, NOT_FOUND = 404, METHOD_NOT_ALLOWED = 405, + NOT_ACCEPTABLE = 406, PROXY_AUTHENTICATION_REQUIRED = 407, CONFLICT = 409, GONE = 410, diff --git a/include/crow/http_connection.h b/include/crow/http_connection.h index cb82df5f9..a6c21875e 100644 --- a/include/crow/http_connection.h +++ b/include/crow/http_connection.h @@ -312,6 +312,7 @@ namespace crow {status::FORBIDDEN, "HTTP/1.1 403 Forbidden\r\n"}, {status::NOT_FOUND, "HTTP/1.1 404 Not Found\r\n"}, {status::METHOD_NOT_ALLOWED, "HTTP/1.1 405 Method Not Allowed\r\n"}, + {status::NOT_ACCEPTABLE, "HTTP/1.1 406 Not Acceptable\r\n"}, {status::PROXY_AUTHENTICATION_REQUIRED, "HTTP/1.1 407 Proxy Authentication Required\r\n"}, {status::CONFLICT, "HTTP/1.1 409 Conflict\r\n"}, {status::GONE, "HTTP/1.1 410 Gone\r\n"},