From: Ryan Bloom Date: Tue, 5 Mar 2002 05:41:28 +0000 (+0000) Subject: Remove another hack from the server. The add_required_filters function X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c31d4786ed43b9bb7e9a84d57ed0322c01e84f09;p=apache Remove another hack from the server. The add_required_filters function was required to make sure that the sub request had the correct filters when we went send the error page. With the new filter insertion logic, this is no longer necessary. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93710 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_request.c b/modules/http/http_request.c index 2f601c8171..353af402fb 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -91,28 +91,6 @@ #include #endif -static void add_required_filters(request_rec *r) -{ - ap_filter_t *f = r->output_filters; - int has_core = 0, has_content = 0, has_http_header = 0; - while (f) { - if(!strcasecmp(f->frec->name, "CORE")) - has_core = 1; - else if(!strcasecmp(f->frec->name, "CONTENT_LENGTH")) - has_content = 1; - else if(!strcasecmp(f->frec->name, "HTTP_HEADER")) - has_http_header = 1; - f = f->next; - } - if(!has_core) - ap_add_output_filter("CORE", NULL, r, r->connection); - if(!has_content) - ap_add_output_filter("CONTENT_LENGTH", NULL, r, r->connection); - if(!has_http_header) - ap_add_output_filter("HTTP_HEADER", NULL, r, r->connection); - -} - /***************************************************************** * * Mainline request processing... @@ -127,8 +105,6 @@ AP_DECLARE(void) ap_die(int type, request_rec *r) * 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; } @@ -229,7 +205,6 @@ AP_DECLARE(void) ap_die(int type, request_rec *r) custom_response); } } - add_required_filters(cur); ap_send_error_response(r, recursive_error); }