From: Justin Erenkrantz Date: Mon, 6 May 2002 23:37:15 +0000 (+0000) Subject: If we determine that we shouldn't be involved in this request, remove X-Git-Tag: 2.0.37~472 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0aa0594f4c0894f8990a78cd50898724080dbf91;p=apache If we determine that we shouldn't be involved in this request, remove ourselves from the filter chain (so we don't duplicate this path each time a brigade comes through). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94982 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 58ad7f69f3..479c0c4387 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -234,6 +234,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, /* only work on main request/no subrequests */ if (r->main) { + ap_remove_output_filter(f); return ap_pass_brigade(f->next, bb); } @@ -241,6 +242,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, * (with browsermatch) for them */ if (apr_table_get(r->subprocess_env, "no-gzip")) { + ap_remove_output_filter(f); return ap_pass_brigade(f->next, bb); } @@ -251,12 +253,14 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, if ((r->content_type == NULL || strncmp(r->content_type, "text/html", 9)) && apr_table_get(r->subprocess_env, "gzip-only-text/html")) { + ap_remove_output_filter(f); return ap_pass_brigade(f->next, bb); } /* if they don't have the line, then they can't play */ accepts = apr_table_get(r->headers_in, "Accept-Encoding"); if (accepts == NULL) { + ap_remove_output_filter(f); return ap_pass_brigade(f->next, bb); } @@ -269,6 +273,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, /* No acceptable token found. */ if (token == NULL || token[0] == '\0') { + ap_remove_output_filter(f); return ap_pass_brigade(f->next, bb); }