| 405 | } |
| 406 | |
| 407 | void ap_process_async_request(request_rec *r) |
| 408 | { |
| 409 | conn_rec *c = r->connection; |
| 410 | int access_status; |
| 411 | |
| 412 | /* Give quick handlers a shot at serving the request on the fast |
| 413 | * path, bypassing all of the other Apache hooks. |
| 414 | * |
| 415 | * This hook was added to enable serving files out of a URI keyed |
| 416 | * content cache ( e.g., Mike Abbott's Quick Shortcut Cache, |
| 417 | * described here: http://oss.sgi.com/projects/apache/mod_qsc.html ) |
| 418 | * |
| 419 | * It may have other uses as well, such as routing requests directly to |
| 420 | * content handlers that have the ability to grok HTTP and do their |
| 421 | * own access checking, etc (e.g. servlet engines). |
| 422 | * |
| 423 | * Use this hook with extreme care and only if you know what you are |
| 424 | * doing. |
| 425 | */ |
| 426 | AP_PROCESS_REQUEST_ENTRY((uintptr_t)r, r->uri); |
| 427 | if (ap_extended_status) { |
| 428 | ap_time_process_request(r->connection->sbh, START_PREQUEST); |
| 429 | } |
| 430 | |
| 431 | if (APLOGrtrace4(r)) { |
| 432 | int i; |
| 433 | const apr_array_header_t *t_h = apr_table_elts(r->headers_in); |
| 434 | const apr_table_entry_t *t_elt = (apr_table_entry_t *)t_h->elts; |
| 435 | ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, |
| 436 | "Headers received from client:"); |
| 437 | for (i = 0; i < t_h->nelts; i++, t_elt++) { |
| 438 | ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, " %s: %s", |
| 439 | ap_escape_logitem(r->pool, t_elt->key), |
| 440 | ap_escape_logitem(r->pool, t_elt->val)); |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | #if APR_HAS_THREADS |
| 445 | apr_thread_mutex_create(&r->invoke_mtx, APR_THREAD_MUTEX_DEFAULT, r->pool); |
| 446 | apr_thread_mutex_lock(r->invoke_mtx); |
| 447 | #endif |
| 448 | access_status = ap_run_quick_handler(r, 0); /* Not a look-up request */ |
| 449 | if (access_status == DECLINED) { |
| 450 | access_status = ap_process_request_internal(r); |
| 451 | if (access_status == OK) { |
| 452 | access_status = ap_invoke_handler(r); |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | if (access_status == SUSPENDED) { |
| 457 | /* TODO: Should move these steps into a generic function, so modules |
| 458 | * working on a suspended request can also call _ENTRY again. |
| 459 | */ |
| 460 | AP_PROCESS_REQUEST_RETURN((uintptr_t)r, r->uri, access_status); |
| 461 | if (ap_extended_status) { |
| 462 | ap_time_process_request(c->sbh, STOP_PREQUEST); |
| 463 | } |
| 464 | if (c->cs) |
no test coverage detected