From ea6cff4e0a3eb29a59ea368ec68983c7783cea15 Mon Sep 17 00:00:00 2001
From: Pekka Helenius
Date: Fri, 21 Sep 2018 21:40:06 +0300
Subject: [PATCH] Update patch_apache_disable_additional_errormsg.patch
---
...h_apache_disable_additional_errormsg.patch | 50 ++++++++++++-------
1 file changed, 31 insertions(+), 19 deletions(-)
diff --git a/patches/patch_apache_disable_additional_errormsg.patch b/patches/patch_apache_disable_additional_errormsg.patch
index c104029..70d5c85 100644
--- a/patches/patch_apache_disable_additional_errormsg.patch
+++ b/patches/patch_apache_disable_additional_errormsg.patch
@@ -1,24 +1,36 @@
-Author: Pekka Helenius (~Fincer), 2018
+uthor: Pekka Helenius (~Fincer), 2018
-Patch: Remove additional error string from Apache server HTTP-based HTML output message. Especially, do not give any clear hints about existence of Apache ErrorDocument parameter to the client.
+Patch: Remove error HTML body from Apache server output message
-This patch is useful for obfuscating server identity to a client but can bury underneath problems in server configuration and thus hamper debugging of errors which are based on HTTP return codes. Thus, use discretion before implementing the patch in your Apache server configuration.
+Removes additional error messages as well.
+Do not give any hints about existence of Apache ErrorDocument to the client
---- a/modules/http/http_protocol.c
-+++ b/modules/http/http_protocol.c
-@@ -1542,12 +1542,12 @@ AP_DECLARE(void) ap_send_error_response(
- get_canned_error_string(status, r, location),
- NULL);
-
-- if (recursive_error) {
-+ /*if (recursive_error) {
- ap_rvputs_proto_in_ascii(r, "Additionally, a ",
- status_lines[ap_index_of_response(recursive_error)],
- "\nerror was encountered while trying to use an "
+This patch is useful in some cases but can bury underneath problems in server
+configuration. Thus, use discretion before implementing the patch
+in your Apache server.
+
+This patch removes default error pages returned by an erroneous HTTP request.
+If you need to use error pages, customize them in your Apache configs.
+
+@@ -1531,7 +1531,7 @@ AP_DECLARE(void) ap_send_error_response(
+ /* can't count on a charset filter being in place here,
+ * so do ebcdic->ascii translation explicitly (if needed)
+ */
+-
++/*
+ ap_rvputs_proto_in_ascii(r,
+ DOCTYPE_HTML_2_0
+ "
\n", title,
+@@ -1549,9 +1549,9 @@ AP_DECLARE(void) ap_send_error_response(
"ErrorDocument to handle the request.
\n", NULL);
-- }
-+ }*/
+ }
ap_rvputs_proto_in_ascii(r, ap_psignature("
\n", r), NULL);
- ap_rvputs_proto_in_ascii(r, "\n", NULL);
- }
-
+- ap_rvputs_proto_in_ascii(r, "