]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix the reset_filters function. If we set r->output_filters to NULL,
authorRyan Bloom <rbb@apache.org>
Mon, 4 Jun 2001 21:43:08 +0000 (21:43 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 4 Jun 2001 21:43:08 +0000 (21:43 +0000)
then we also have to reset the connection's filters.
Submitted by: John Sterling <sterling@covalent.net>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89269 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http/http_protocol.c

diff --git a/CHANGES b/CHANGES
index c161dab902dff03bbbe5bf9ef05a6af1c9954bd3..82946ab76181711fdb8644ebeb3443049b2f68ae 100644 (file)
--- 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
index 2c432e2f9ba3ca377d4a6f054d149190b18dd3f9..ab5f15245ba013d977ff1ac49250767f78d54e51 100644 (file)
@@ -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);
 }