]> granicus.if.org Git - apache/commitdiff
Get the default_handler to use the bucket code directly. This keeps us
authorRyan Bloom <rbb@apache.org>
Mon, 13 Nov 2000 23:42:40 +0000 (23:42 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 13 Nov 2000 23:42:40 +0000 (23:42 +0000)
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

index 26332bd87894aa262d5e730a19a0846ef1a34c11..045698505dbe74ab15e14fe726c7e7b23edde293 100644 (file)
@@ -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;