]> granicus.if.org Git - apache/commitdiff
Remove another hack from the server. The add_required_filters function
authorRyan Bloom <rbb@apache.org>
Tue, 5 Mar 2002 05:41:28 +0000 (05:41 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 5 Mar 2002 05:41:28 +0000 (05:41 +0000)
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

modules/http/http_request.c

index 2f601c8171e32323db1f04555d1b0e13d00d6674..353af402fb7c14a8695374f318cebf497b7692e2 100644 (file)
 #include <stdarg.h>
 #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);
 }