Commit a491d438 authored by Joe Orton's avatar Joe Orton
Browse files

* 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
parent 8d11cff5
Loading
Loading
Loading
Loading
+1 −0
Changes for include/httpd.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -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
+4 −1
Changes for modules/http/http_protocol.c: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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("<p>The method could not be performed on the resource\n"
               "because the requested action depended on another\n"
               "action and that other action failed.</p>\n");
    case HTTP_TOO_EARLY:
        return("<p>The request could not be processed as TLS\n"
               "early data and should be retried.</p>\n");
    case HTTP_UPGRADE_REQUIRED:
        return("<p>The requested resource can only be retrieved\n"
               "using SSL.  The server is willing to upgrade the current\n"