Commit 43ab182c authored by Nick Kew's avatar Nick Kew
Browse files

Fix bugs pointed out by rpluem in rewritemap/dbd


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@454723 13f79535-47bb-0310-9956-ffa450edef68
parent e6f3b022
Loading
Loading
Loading
Loading
+3 −2
Changes for modules/mappers/mod_rewrite.c: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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;
        }