From: Ryan Bloom Date: Mon, 4 Jun 2001 21:43:08 +0000 (+0000) Subject: Fix the reset_filters function. If we set r->output_filters to NULL, X-Git-Tag: 2.0.19~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2abe50dc9a445f0b32e8ff5e5c2ac4f49d6b5d20;p=thirdparty%2Fapache%2Fhttpd.git Fix the reset_filters function. If we set r->output_filters to NULL, then we also have to reset the connection's filters. Submitted by: John Sterling git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89269 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index c161dab902d..82946ab7618 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.19-dev + *) Fix reset_filter(). We need to be careful how we remove filters. + If we set r->output_filters to NULL, we also have to reset the + connection's filters. [John Sterling] + *) Optimise reset_filter() in http_protocol.c. [Greg Stein] *) Add a check to ap_die() to make sure the filter stack is sane and diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 2c432e2f9ba..ab5f15245ba 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1745,8 +1745,9 @@ static const char *get_canned_error_string(int status, static void reset_filters(request_rec *r) { - r->output_filters = NULL; - ap_add_output_filter("CORE", NULL, r, r->connection); + r->connection->output_filters = r->output_filters = NULL; + ap_add_output_filter("CORE", NULL, NULL, r->connection); + r->output_filters = r->connection->output_filters; ap_add_output_filter("CONTENT_LENGTH", NULL, r, r->connection); ap_add_output_filter("HTTP_HEADER", NULL, r, r->connection); }