mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
* server/core.c (default_handler): Use apr_brigade_insert_file() to
append the file to the brigade. * server/protocol.c (ap_send_fd), modules/proxy/mod_proxy_http.c (spool_reqbody_cl), modules/cache/mod_mem_cache.c (recall_body), modules/cache/mod_disk_cache.c (recall_body), modules/mappers/mod_negotiation.c (handle_map_file), modules/generators/mod_asis.c (asis_handler), modules/dav/fs/repos.c [DEBUG_GET_HANDLER] (dav_fs_deliver), modules/arch/win32/mod_isapi.c (ServerSupportFunction): Likewise. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@414238 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -90,28 +90,8 @@ static int asis_handler(request_rec *r)
|
||||
}
|
||||
|
||||
bb = apr_brigade_create(r->pool, c->bucket_alloc);
|
||||
#if APR_HAS_LARGE_FILES
|
||||
if (r->finfo.size - pos > AP_MAX_SENDFILE) {
|
||||
/* APR_HAS_LARGE_FILES issue; must split into mutiple buckets,
|
||||
* no greater than MAX(apr_size_t), and more granular than that
|
||||
* in case the brigade code/filters attempt to read it directly.
|
||||
*/
|
||||
apr_off_t fsize = r->finfo.size - pos;
|
||||
b = apr_bucket_file_create(f, pos, AP_MAX_SENDFILE,
|
||||
r->pool, c->bucket_alloc);
|
||||
while (fsize > AP_MAX_SENDFILE) {
|
||||
APR_BRIGADE_INSERT_TAIL(bb, b);
|
||||
apr_bucket_copy(b, &b);
|
||||
b->start += AP_MAX_SENDFILE;
|
||||
fsize -= AP_MAX_SENDFILE;
|
||||
}
|
||||
b->length = (apr_size_t)fsize; /* Resize just the last bucket */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
b = apr_bucket_file_create(f, pos, (apr_size_t) (r->finfo.size - pos),
|
||||
r->pool, c->bucket_alloc);
|
||||
APR_BRIGADE_INSERT_TAIL(bb, b);
|
||||
apr_brigade_insert_file(bb, f, pos, r->finfo.size - pos, r->pool);
|
||||
|
||||
b = apr_bucket_eos_create(c->bucket_alloc);
|
||||
APR_BRIGADE_INSERT_TAIL(bb, b);
|
||||
rv = ap_pass_brigade(r->output_filters, bb);
|
||||
|
Reference in New Issue
Block a user