From b917376bdb0a1fc749cab3f1b96ae1e1aea0e253 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Thu, 21 Aug 2025 07:04:46 +0000 Subject: [PATCH] * include/httpd.h: Define HTTP_EARLY_HINTS (103) per RFC 8297. * modules/http/http_protocol.c (status_lines): Add 103 response. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927935 13f79535-47bb-0310-9956-ffa450edef68 --- include/httpd.h | 3 ++- modules/http/http_protocol.c | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/httpd.h b/include/httpd.h index 577891e567..b12b7e4e21 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -487,11 +487,12 @@ AP_DECLARE(const char *) ap_get_server_built(void); * When adding a new code here add it to status_lines as well. * A future version should dynamically generate the apr_table_t at startup. */ -#define RESPONSE_CODES 103 +#define RESPONSE_CODES 104 #define HTTP_CONTINUE 100 #define HTTP_SWITCHING_PROTOCOLS 101 #define HTTP_PROCESSING 102 +#define HTTP_EARLY_HINTS 103 #define HTTP_OK 200 #define HTTP_CREATED 201 #define HTTP_ACCEPTED 202 diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 75c4531bf0..41d9f7fc7d 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -75,7 +75,8 @@ static const char * const status_lines[RESPONSE_CODES] = "100 Continue", "101 Switching Protocols", "102 Processing", -#define LEVEL_200 3 + "103 Early Hints", +#define LEVEL_200 4 "200 OK", "201 Created", "202 Accepted", @@ -103,7 +104,7 @@ static const char * const status_lines[RESPONSE_CODES] = NULL, /* 224 */ NULL, /* 225 */ "226 IM Used", -#define LEVEL_300 30 +#define LEVEL_300 31 "300 Multiple Choices", "301 Moved Permanently", "302 Found", @@ -113,7 +114,7 @@ static const char * const status_lines[RESPONSE_CODES] = NULL, /* 306 */ "307 Temporary Redirect", "308 Permanent Redirect", -#define LEVEL_400 39 +#define LEVEL_400 40 "400 Bad Request", "401 Unauthorized", "402 Payment Required", @@ -166,7 +167,7 @@ static const char * const status_lines[RESPONSE_CODES] = NULL, /* 449 */ NULL, /* 450 */ "451 Unavailable For Legal Reasons", -#define LEVEL_500 91 +#define LEVEL_500 92 "500 Internal Server Error", "501 Not Implemented", "502 Bad Gateway", -- 2.47.2