From: Graham Leggett Date: Tue, 12 Oct 2010 22:43:49 +0000 (+0000) Subject: Make sure we remove the cache lock consistently as soon as we've started X-Git-Tag: 2.3.9~329 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf69cf6369d82c121951c2b1a1497f9251bc3a10;p=thirdparty%2Fapache%2Fhttpd.git Make sure we remove the cache lock consistently as soon as we've started down the error path, so that we don't delay the next attempt to cache. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021944 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index a86d0adefa6..90234169241 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -1543,6 +1543,10 @@ static void cache_insert_error_filter(request_rec *r) NULL, apr_table_get(cache->stale_handle->resp_hdrs, "Cache-Control"), "must-revalidate", NULL)) { const char *warn_head; + cache_server_conf + *conf = + (cache_server_conf *) ap_get_module_config(r->server->module_config, + &cache_module); /* morph the current save filter into the out filter, and serve from * cache. @@ -1579,6 +1583,9 @@ static void cache_insert_error_filter(request_rec *r) "cache hit: %d status; stale content returned", r->status)); + /* give someone else the chance to cache the file */ + cache_remove_lock(conf, cache, r, NULL); + } }