From 1989a23d36a50565a20a512ea4e70e88dc6f2977 Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Mon, 13 Nov 2000 23:42:40 +0000 Subject: [PATCH] Get the default_handler to use the bucket code directly. This keeps us from traveling down the stack multiple time for a static page. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86944 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 26332bd878..045698505d 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2940,9 +2940,14 @@ static int default_handler(request_rec *r) } if (!r->header_only) { - apr_size_t nbytes; + ap_bucket_brigade *bb = ap_brigade_create(r->pool); + ap_bucket *e = ap_bucket_create_file(fd, 0, r->finfo.size); - ap_send_fd(fd, r, 0, r->finfo.size, &nbytes); + AP_BRIGADE_INSERT_HEAD(bb, e); + e = ap_bucket_create_eos(); + AP_BRIGADE_INSERT_TAIL(bb, e); + + ap_pass_brigade(r->output_filters, bb); } return OK; -- 2.50.1