]> granicus.if.org Git - apache/commitdiff
Fix bugs pointed out by rpluem in rewritemap/dbd
authorNick Kew <niq@apache.org>
Tue, 10 Oct 2006 12:47:50 +0000 (12:47 +0000)
committerNick Kew <niq@apache.org>
Tue, 10 Oct 2006 12:47:50 +0000 (12:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@454723 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_rewrite.c

index 5bfed52e2ea32f82c18f478498df10b4ae41a5be..8775ad1a1dfed83d0ad4ed5e8cdaf8083b8484d8 100644 (file)
@@ -1658,7 +1658,7 @@ static char *lookup_map(request_rec *r, char *name, char *key)
      * SQL map with cache
      */
     case MAPTYPE_DBD_CACHE:
-        value = get_cache_value(s->cachename, st.mtime, key, r->pool);
+        value = get_cache_value(s->cachename, 0, key, r->pool);
         if (!value) {
             rewritelog((r, 6, NULL,
                         "cache lookup FAILED, forcing new map lookup"));
@@ -1667,13 +1667,14 @@ static char *lookup_map(request_rec *r, char *name, char *key)
             if (!value) {
                 rewritelog((r, 5, NULL, "SQL map lookup FAILED: map %s key=%s",
                             name, key));
+                set_cache_value(s->cachename, 0, key, "");
                 return NULL;
             }
 
             rewritelog((r, 5, NULL, "SQL map lookup OK: map %s key=%s, val=%s",
                         name, key, value));
 
-            set_cache_value(s->cachename, st.mtime, key, value);
+            set_cache_value(s->cachename, 0, key, value);
             return value;
         }