diff options
author | Graham Leggett <minfrin@apache.org> | 2015-10-04 12:10:51 +0200 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2015-10-04 12:10:51 +0200 |
commit | 615f97f93364fd7189ce973478266ce3d229d76b (patch) | |
tree | 84b9f0601b3a3ba6ecb0caf794378d7019f850e5 /modules/http | |
parent | leave LoadModule of mod_http2 commented-out by default (diff) | |
download | apache2-615f97f93364fd7189ce973478266ce3d229d76b.tar.xz apache2-615f97f93364fd7189ce973478266ce3d229d76b.zip |
core: Extend support for asynchronous write completion from the
network filter to any connection or request filter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1706669 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http')
-rw-r--r-- | modules/http/http_core.c | 2 | ||||
-rw-r--r-- | modules/http/http_request.c | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 345de8109a..f2ca67fc9c 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -263,6 +263,8 @@ static int http_create_request(request_rec *r) NULL, r, r->connection); ap_add_output_filter_handle(ap_http_outerror_filter_handle, NULL, r, r->connection); + ap_add_output_filter_handle(ap_request_core_filter_handle, + NULL, r, r->connection); } return OK; diff --git a/modules/http/http_request.c b/modules/http/http_request.c index 0143a2e73f..28580c67db 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -256,6 +256,14 @@ AP_DECLARE(void) ap_process_request_after_handler(request_rec *r) apr_bucket *b; conn_rec *c = r->connection; + /* Find the last request, taking into account internal + * redirects. We want to send the EOR bucket at the end of + * all the buckets so it does not jump the queue. + */ + while (r->next) { + r = r->next; + } + /* Send an EOR bucket through the output filter chain. When * this bucket is destroyed, the request will be logged and * its pool will be freed @@ -264,8 +272,8 @@ AP_DECLARE(void) ap_process_request_after_handler(request_rec *r) b = ap_bucket_eor_create(c->bucket_alloc, r); APR_BRIGADE_INSERT_HEAD(bb, b); - ap_pass_brigade(c->output_filters, bb); - + ap_pass_brigade(r->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 * occured before that (eg. c->aborted => still in bb) and we ought |