From: Jim Jagielski Date: Wed, 7 May 2014 12:51:18 +0000 (+0000) Subject: Merge r1588704 from trunk: X-Git-Tag: 2.4.10~256 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ed81eaabc30a67a2eee0ac1ddb1eb0daa2b17c1;p=apache Merge r1588704 from trunk: Fix errors with CacheLock on Windows: cache_util.c(757): (OS 80)The file exists. : [client 127.0.0.1:63889] AH00784: Attempt to obtain a cache lock for stale cached URL failed, revalidating entry anyway: Submitted by: covener Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1593000 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index b300af53b5..0e88a502b7 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.4.10 + *) mod_cache: Fix AH00784 errors on Windows when the the CacheLock directive + is enabled. [Eric Covener] + *) mod_expires: don't add Expires header to error responses (4xx/5xx), be they generated or forwarded. PR 55669. [ Yann Ylavic ] diff --git a/STATUS b/STATUS index 8038c4b039..aca381f59c 100644 --- a/STATUS +++ b/STATUS @@ -100,11 +100,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_cache: Fix CacheLock on Windows - trunk patch: http://svn.apache.org/r1588704 - 2.4.x patch: trunk works - +1 covener, trawick, jim - * mod_ssl: set the current cert in ssl_callback_TmpDH before calling SSL_get_privatekey(ssl) trunk patch: https://svn.apache.org/r1588851 diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c index 7b7fb45c23..cafbc16781 100644 --- a/modules/cache/cache_util.c +++ b/modules/cache/cache_util.c @@ -240,7 +240,7 @@ CACHE_DECLARE(apr_int64_t) ap_cache_current_age(cache_info *info, * Try obtain a cache wide lock on the given cache key. * * If we return APR_SUCCESS, we obtained the lock, and we are clear to - * proceed to the backend. If we return APR_EEXISTS, then the lock is + * proceed to the backend. If we return APR_EEXIST, then the lock is * already locked, someone else has gone to refresh the backend data * already, so we must return stale data with a warning in the mean * time. If we return anything else, then something has gone pear @@ -735,9 +735,9 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache, r->unparsed_uri); return 0; } - else if (APR_EEXIST == status) { + else if (APR_STATUS_IS_EEXIST(status)) { /* lock already exists, return stale data anyway, with a warning */ - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00783) + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00783) "Cache already locked for stale cached URL, " "pretend it is fresh: %s", r->unparsed_uri);