From: Joe Orton Date: Wed, 26 Sep 2018 09:01:19 +0000 (+0000) Subject: * include/httpd.h: Define HTTP_TOO_EARLY (425) per RFC 8470. X-Git-Tag: 2.5.0-alpha2-ci-test-only~2325 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a0f075a5475cfa3e4cba358cfdf32420563e755;p=thirdparty%2Fapache%2Fhttpd.git * include/httpd.h: Define HTTP_TOO_EARLY (425) per RFC 8470. * modules/http/http_protocol.c (status_lines, get_canned_error_string): Add 425 response. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1842007 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/httpd.h b/include/httpd.h index 1f6a6082004..df770492153 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -528,6 +528,7 @@ AP_DECLARE(const char *) ap_get_server_built(void); #define HTTP_UNPROCESSABLE_ENTITY 422 #define HTTP_LOCKED 423 #define HTTP_FAILED_DEPENDENCY 424 +#define HTTP_TOO_EARLY 425 #define HTTP_UPGRADE_REQUIRED 426 #define HTTP_PRECONDITION_REQUIRED 428 #define HTTP_TOO_MANY_REQUESTS 429 diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 928596c29bd..b302f109522 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -139,7 +139,7 @@ static const char * const status_lines[RESPONSE_CODES] = "422 Unprocessable Entity", "423 Locked", "424 Failed Dependency", - NULL, /* 425 */ + "425 Too Early", "426 Upgrade Required", NULL, /* 427 */ "428 Precondition Required", @@ -1109,6 +1109,9 @@ static const char *get_canned_error_string(int status, return("

The method could not be performed on the resource\n" "because the requested action depended on another\n" "action and that other action failed.

\n"); + case HTTP_TOO_EARLY: + return("

The request could not be processed as TLS\n" + "early data and should be retried.

\n"); case HTTP_UPGRADE_REQUIRED: return("

The requested resource can only be retrieved\n" "using SSL. The server is willing to upgrade the current\n"