]> granicus.if.org Git - apache/commitdiff
Fix a bug which would cause the response headers to be omitted
authorCliff Woolley <jwoolley@apache.org>
Tue, 13 Nov 2001 07:37:13 +0000 (07:37 +0000)
committerCliff Woolley <jwoolley@apache.org>
Tue, 13 Nov 2001 07:37:13 +0000 (07:37 +0000)
when sending a negotiated ErrorDocument because the required
filters were attached to the wrong request_rec.

Submitted by: John Sterling <sterling@covalent.net>
Reviewed by: Justin Erenkrantz, Cliff Woolley

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91900 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http/http_request.c

diff --git a/CHANGES b/CHANGES
index 5a65c4e96229d5027bb543d7df3540d9e2aab158..7d6770a9009a387c751c85140c316ecb6489cdb5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
 Changes with Apache 2.0.29-dev
 
+  *) Fix a bug which would cause the response headers to be omitted
+     when sending a negotiated ErrorDocument because the required
+     filters were attached to the wrong request_rec.
+     [John Sterling <sterling@covalent.net>]
+
   *) Remove commas from the end of the macros that define
      directives that are used by MPMs.  Prior to this patch,
      you would use these macros without commas, which was unlike
index 9bb4bece4ea7020f821c6c49b71a87a3e3405c86..99a53cfc18cebbd077fa3f6ec1b0b6e1335156a5 100644 (file)
@@ -123,6 +123,11 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
     int error_index = ap_index_of_response(type);
     char *custom_response = ap_response_code_string(r, error_index);
     int recursive_error = 0;
+    /* There are some cases where we walk up the request hierarchy
+     * to obtain the original error, but when adding the required_filters,
+     * we need to do so against the one we came in with.  So, save it.
+     */
+    request_rec *cur = r;
 
     if (type == AP_FILTER_ERROR) {
         return;
@@ -224,7 +229,7 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
                         custom_response);
         }
     }
-    add_required_filters(r);
+    add_required_filters(cur);
     ap_send_error_response(r, recursive_error);
 }