mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Move the quick_handler comment to the new quick handler location. Do not
call quick handler on a dirent subrequest. This fixes a nasty problem in mod_cache where it was serving up content on a dirent subrequest. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93915 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -239,24 +239,6 @@ void ap_process_request(request_rec *r)
|
|||||||
{
|
{
|
||||||
int access_status;
|
int access_status;
|
||||||
|
|
||||||
/* Give quick handlers a shot at serving the request on the fast
|
|
||||||
* path, bypassing all of the other Apache hooks.
|
|
||||||
*
|
|
||||||
* This hook was added to enable serving files out of a URI keyed
|
|
||||||
* content cache ( e.g., Mike Abbott's Quick Shortcut Cache,
|
|
||||||
* described here: http://oss.sgi.com/projects/apache/mod_qsc.html )
|
|
||||||
*
|
|
||||||
* It may have other uses as well, such as routing requests directly to
|
|
||||||
* content handlers that have the ability to grok HTTP and do their
|
|
||||||
* own access checking, etc (e.g. servlet engines).
|
|
||||||
*
|
|
||||||
* Use this hook with extreme care and only if you know what you are
|
|
||||||
* doing.
|
|
||||||
*
|
|
||||||
* Consider moving this hook to after the first location_walk in order
|
|
||||||
* to enable the quick handler to make decisions based on config
|
|
||||||
* directives in Location blocks.
|
|
||||||
*/
|
|
||||||
access_status = ap_process_request_internal(r);
|
access_status = ap_process_request_internal(r);
|
||||||
if (access_status == OK) {
|
if (access_status == OK) {
|
||||||
access_status = ap_invoke_handler(r);
|
access_status = ap_invoke_handler(r);
|
||||||
|
@@ -145,6 +145,25 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
|
|||||||
int file_req = (r->main && r->filename);
|
int file_req = (r->main && r->filename);
|
||||||
int access_status;
|
int access_status;
|
||||||
|
|
||||||
|
/* Give quick handlers a shot at serving the request on the fast
|
||||||
|
* path, bypassing all of the other Apache hooks. Bypass the call
|
||||||
|
* for dirent subrequests (any other cases to bypass?)
|
||||||
|
*
|
||||||
|
* This hook was added to enable serving files out of a URI keyed
|
||||||
|
* content cache ( e.g., Mike Abbott's Quick Shortcut Cache,
|
||||||
|
* described here: http://oss.sgi.com/projects/apache/mod_qsc.html )
|
||||||
|
*
|
||||||
|
* It may have other uses as well, such as routing requests directly to
|
||||||
|
* content handlers that have the ability to grok HTTP and do their
|
||||||
|
* own access checking, etc (e.g. servlet engines).
|
||||||
|
*
|
||||||
|
* Use this hook with extreme care and only if you know what you are
|
||||||
|
* doing. This hook is available to (non dirent) subrequests.
|
||||||
|
*/
|
||||||
|
if (!(r->main && r->filename && r->finfo.filetype)) {
|
||||||
|
/* TODO?: Add a field to the request_rec explicitly identifying
|
||||||
|
* the type of subrequest?
|
||||||
|
*/
|
||||||
access_status = ap_run_quick_handler(r);
|
access_status = ap_run_quick_handler(r);
|
||||||
if (access_status != DECLINED) {
|
if (access_status != DECLINED) {
|
||||||
if (access_status == OK) {
|
if (access_status == OK) {
|
||||||
@@ -154,6 +173,7 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
|
|||||||
return access_status;
|
return access_status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Ignore embedded %2F's in path for proxy requests */
|
/* Ignore embedded %2F's in path for proxy requests */
|
||||||
if (!r->proxyreq && r->parsed_uri.path) {
|
if (!r->proxyreq && r->parsed_uri.path) {
|
||||||
|
Reference in New Issue
Block a user