From: Jeff Trawick Date: Mon, 6 Jan 2014 12:02:38 +0000 (+0000) Subject: Merge from trunk r1547845: X-Git-Tag: 2.4.8~269 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=982486ece0a47799e8b22a15998a5e690447a660;p=apache Merge from trunk r1547845: mod_cache_disk: Fix potential hangs on Windows when using mod_cache_disk. PR: 55833 Submitted by: covener Reviewed by: jim, trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1555721 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 893a63df0f..5d2db0a303 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.4.8 + *) mod_cache_disk: Fix potential hangs on Windows when using mod_cache_disk. + PR55833. [Eric Covener] + *) mod_ssl: Add support for OpenSSL configuration commands by introducing the SSLOpenSSLConfCmd directive. [Stephen Henson, Kaspar Brand] diff --git a/STATUS b/STATUS index 8b223aca98..cf3bd95096 100644 --- a/STATUS +++ b/STATUS @@ -98,11 +98,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_cache_disk hangs on windows reading from closed files - trunk patch: http://svn.apache.org/r1547845 - 2.4.x patch: trunk works - +1 covener, jim, trawick - * mod_ldap: restrict a recent WIN32 change to only apply when the MS SDK is used trunk patch: http://svn.apache.org/r1551802 2.4.x patch: trunk works diff --git a/modules/cache/mod_cache_disk.c b/modules/cache/mod_cache_disk.c index 95ff1fc029..ddf6431440 100644 --- a/modules/cache/mod_cache_disk.c +++ b/modules/cache/mod_cache_disk.c @@ -529,13 +529,13 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key) return DECLINED; } - apr_file_close(dobj->hdrs.fd); /* Is this a cached HEAD request? */ if (dobj->disk_info.header_only && !r->header_only) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(00707) "HEAD request cached, non-HEAD requested, ignoring: %s", dobj->hdrs.file); + apr_file_close(dobj->hdrs.fd); return DECLINED; } @@ -593,6 +593,7 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key) "Cached URL info header '%s' didn't match body, ignoring this entry", dobj->name); + apr_file_close(dobj->hdrs.fd); return DECLINED; }