From ca85a3678f2594b80a131fa05a55fd1bd7aa06db Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Thu, 22 Dec 2016 19:44:37 +0000 Subject: [PATCH] Backports: r1635762 Submitted By: Edward Lu Support custom ErrorDocuments for HTTP 501 and 414 status codes. PR 57167 [Edward Lu ] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x-merge-http-strict@1775718 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ server/protocol.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 5557aba1965..c9270c7a6c1 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,9 @@ Changes with Apache 2.2.32 *) core: Enforce LimitRequestFieldSize after multiple headers with the same name have been merged. [Stefan Fritsch] + *) core: Support custom ErrorDocuments for HTTP 501 and 414 status codes. + PR 57167 [Edward Lu ] + Changes with Apache 2.2.31 *) Correct win32 build issues for mod_proxy exports, OpenSSL 1.0.x headers. diff --git a/server/protocol.c b/server/protocol.c index f49f38690c6..4bb3bef2f17 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -983,9 +983,12 @@ request_rec *ap_read_request(conn_rec *conn) ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "request failed: invalid characters in URI"); } - ap_send_error_response(r, 0); + access_status = r->status; + r->status = HTTP_OK; + ap_die(access_status, r); ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r); ap_run_log_transaction(r); + r = NULL; apr_brigade_destroy(tmp_bb); return r; } -- 2.47.2