| 287 | } |
| 288 | |
| 289 | static 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 | |
| 307 | static int file_cache_handler(request_rec *r) |
| 308 | { |
no test coverage detected