MCPcopy Create free account
hub / github.com/apache/httpd / sendfile_handler

Function sendfile_handler

modules/cache/mod_file_cache.c:289–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287}
288
289static int sendfile_handler(request_rec *r, a_file *file)
290{
291#if APR_HAS_SENDFILE
292 conn_rec *c = r->connection;
293 apr_bucket *b;
294 apr_bucket_brigade *bb = apr_brigade_create(r->pool, c->bucket_alloc);
295
296 apr_brigade_insert_file(bb, file->file, 0, file->finfo.size, r->pool);
297
298 b = apr_bucket_eos_create(c->bucket_alloc);
299 APR_BRIGADE_INSERT_TAIL(bb, b);
300
301 if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS)
302 return AP_FILTER_ERROR;
303#endif
304 return OK;
305}
306
307static int file_cache_handler(request_rec *r)
308{

Callers 1

file_cache_handlerFunction · 0.85

Calls 1

ap_pass_brigadeFunction · 0.85

Tested by

no test coverage detected