mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
core: don't send EOR bucket through request filters.
The core request filter is the only one which should take care of it. In theory the other request filters should have bailed out on EOS already, but that's not always the case (and even less the case on error). So be safe by not sending them a bucket which may destroy the request (and their brigade) underneath them. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1822600 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -346,6 +346,7 @@ AP_DECLARE(void) ap_process_request_after_handler(request_rec *r)
|
||||
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
|
||||
@@ -363,7 +364,17 @@ AP_DECLARE(void) ap_process_request_after_handler(request_rec *r)
|
||||
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
|
||||
|
Reference in New Issue
Block a user