apr_bucket *b;
conn_rec *c = r->connection;
apr_status_t rv;
+ ap_filter_t *f;
/* Send an EOR bucket through the output filter chain. When
* this bucket is destroyed, the request will be logged and
r = r->next;
}
- ap_pass_brigade(r->output_filters, bb);
+ /* All the request filters should have bailed out on EOS, and in any
+ * case they shouldn't have to handle this EOR which will destroy the
+ * request underneath them. So go straight to the core request filter
+ * which (if any) will take care of the setaside buckets.
+ */
+ for (f = r->output_filters; f; f = f->next) {
+ if (f->frec == ap_request_core_filter_handle) {
+ break;
+ }
+ }
+ ap_pass_brigade(f ? f : c->output_filters, bb);
/* The EOR bucket has either been handled by an output filter (eg.
* deleted or moved to a buffered_bb => no more in bb), or an error