Commit 03d78e50 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

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 <sterling@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89269 13f79535-47bb-0310-9956-ffa450edef68
parent 784b0e29
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
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
+3 −2
Original line number Diff line number Diff line
@@ -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);
}