Changes with Apache 2.0.19-dev
+ *) Optimise reset_filter() in http_protocol.c. [Greg Stein]
+
*) Add a check to ap_die() to make sure the filter stack is sane and
contains the correct basic filters when an error occurs. This fixes
a problem where headers are not being sent on error. [John Sterling]
static void reset_filters(request_rec *r)
{
- ap_filter_t *f = r->output_filters;
-
- while (f) {
- if (!strcasecmp(f->frec->name, "CORE") ||
- !strcasecmp(f->frec->name, "CONTENT_LENGTH") ||
- !strcasecmp(f->frec->name, "HTTP_HEADER")) {
- f = f->next;
- continue;
- }
- else {
- ap_remove_output_filter(f);
- f = f->next;
- }
- }
+ r->output_filters = NULL;
+ ap_add_output_filter("CORE", NULL, r, r->connection);
+ ap_add_output_filter("CONTENT_LENGTH", NULL, r, r->connection);
+ ap_add_output_filter("HTTP_HEADER", NULL, r, r->connection);
}
/* We should have named this send_canned_response, since it is used for any