| 268 | } |
| 269 | |
| 270 | static int mmap_handler(request_rec *r, a_file *file) |
| 271 | { |
| 272 | #if APR_HAS_MMAP |
| 273 | conn_rec *c = r->connection; |
| 274 | apr_bucket *b; |
| 275 | apr_bucket_brigade *bb = apr_brigade_create(r->pool, c->bucket_alloc); |
| 276 | |
| 277 | b = apr_bucket_immortal_create((const char *)file->mm->mm, |
| 278 | (apr_size_t)file->finfo.size, c->bucket_alloc); |
| 279 | APR_BRIGADE_INSERT_TAIL(bb, b); |
| 280 | b = apr_bucket_eos_create(c->bucket_alloc); |
| 281 | APR_BRIGADE_INSERT_TAIL(bb, b); |
| 282 | |
| 283 | if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS) |
| 284 | return AP_FILTER_ERROR; |
| 285 | #endif |
| 286 | return OK; |
| 287 | } |
| 288 | |
| 289 | static int sendfile_handler(request_rec *r, a_file *file) |
| 290 | { |
no test coverage detected