From 63249ba96ab5a48d82dd05a59fd87193c1a819c2 Mon Sep 17 00:00:00 2001 From: rmg-x Date: Tue, 11 Mar 2025 18:12:29 -0500 Subject: [PATCH] LibHTTP: Add more reason phrases for 4xx response codes https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml --- Libraries/LibHTTP/HttpResponse.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Libraries/LibHTTP/HttpResponse.cpp b/Libraries/LibHTTP/HttpResponse.cpp index 6ab9f4d7cc..82ff75d3bf 100644 --- a/Libraries/LibHTTP/HttpResponse.cpp +++ b/Libraries/LibHTTP/HttpResponse.cpp @@ -55,7 +55,17 @@ StringView HttpResponse::reason_phrase_for_code(int code) { 415, "Unsupported Media Type"sv }, { 416, "Range Not Satisfiable"sv }, { 417, "Expectation Failed"sv }, + { 418, "I'm a teapot"sv }, + { 421, "Misdirected Request"sv }, + { 422, "Unprocessable Content"sv }, + { 423, "Locked"sv }, + { 424, "Failed Dependency"sv }, + { 425, "Too Early"sv }, { 426, "Upgrade Required"sv }, + { 428, "Precondition Required"sv }, + { 429, "Too Many Requests"sv }, + { 431, "Request Header Fields Too Large"sv }, + { 451, "Unavailable For Legal Reasons"sv }, { 500, "Internal Server Error"sv }, { 501, "Not Implemented"sv }, { 502, "Bad Gateway"sv },