]> granicus.if.org Git - apache/commitdiff
Move the quick_handler comment to the new quick handler location. Do not
authorBill Stoddard <stoddard@apache.org>
Wed, 13 Mar 2002 19:41:56 +0000 (19:41 +0000)
committerBill Stoddard <stoddard@apache.org>
Wed, 13 Mar 2002 19:41:56 +0000 (19:41 +0000)
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

modules/http/http_request.c
server/request.c

index efe843ac55a1330364ca09417786da2e5abc64f8..852f55a362465e49e62b6ea3dff31cf83d115e40 100644 (file)
@@ -239,24 +239,6 @@ void ap_process_request(request_rec *r)
 {
     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);
     if (access_status == OK) {
         access_status = ap_invoke_handler(r);
index 507a30a35fc06c6180afd575df270492ed512f45..b9d082122bcdf9d2413efd51546b9bf25226106a 100644 (file)
@@ -145,13 +145,33 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
     int file_req = (r->main && r->filename);
     int access_status;
 
-    access_status = ap_run_quick_handler(r);
-    if (access_status != DECLINED) {
-        if (access_status == OK) {
-            return DONE;
-        }
-        else  {
-            return 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);
+        if (access_status != DECLINED) {
+            if (access_status == OK) {
+                return DONE;
+            }
+            else  {
+                return access_status;
+            }
         }
     }