This patch fixes a bug which can cause the response headers to be omitted when sending a negotiated ErrorDocument because the required filters were attached to the wrong request_rec. This can affect installations which enable authentication on / or /error, among others. =================================================================== RCS file: /home/cvspublic/httpd-2.0/modules/http/http_request.c,v retrieving revision 1.119 retrieving revision 1.120 diff -u -r1.119 -r1.120 --- httpd-2.0/modules/http/http_request.c 2001/11/13 06:12:41 1.119 +++ httpd-2.0/modules/http/http_request.c 2001/11/13 07:37:13 1.120 @@ -123,6 +123,11 @@ 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 @@ custom_response); } } - add_required_filters(r); + add_required_filters(cur); ap_send_error_response(r, recursive_error); }