]> granicus.if.org Git - apache/commitdiff
Optimization: skip cache setup in location_walk() if the vhost
authorBrian Pane <brianp@apache.org>
Sun, 12 May 2002 03:45:47 +0000 (03:45 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 12 May 2002 03:45:47 +0000 (03:45 +0000)
config contains no <Location> blocks

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95044 13f79535-47bb-0310-9956-ffa450edef68

server/request.c

index 271b6d57aad8f8b3634bc16c80ba93b0bc3646fd..1a6aea9a3d315d833b4b6505b3af3f0cb71018b9 100644 (file)
@@ -1192,8 +1192,6 @@ AP_DECLARE(int) ap_location_walk(request_rec *r)
     walk_cache_t *cache;
     const char *entry_uri;
 
-    cache = prep_walk_cache(AP_NOTE_LOCATION_WALK, r);
-
     /* No tricks here, there are no <Locations > to parse in this vhost.
      * We won't destroy the cache, just in case _this_ redirect is later
      * redirected again to a vhost with <Location > blocks to optimize.
@@ -1202,6 +1200,8 @@ AP_DECLARE(int) ap_location_walk(request_rec *r)
         return OK;
     }
 
+    cache = prep_walk_cache(AP_NOTE_LOCATION_WALK, r);
+
     /* Location and LocationMatch differ on their behaviour w.r.t. multiple
      * slashes.  Location matches multiple slashes with a single slash,
      * LocationMatch doesn't.  An exception, for backwards brokenness is