You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2006/09/26 16:12:37 UTC
svn commit: r450055 - in /httpd/httpd/trunk: CHANGES
modules/cache/mod_cache.c
Author: minfrin
Date: Tue Sep 26 07:12:36 2006
New Revision: 450055
URL: http://svn.apache.org/viewvc?view=rev&rev=450055
Log:
Don't cache requests with a expires date in the past; otherwise mod_cache will
always try to cache the URL. This bug might lead to numerous rename() errors
on win32 if the URL was previously cached.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/cache/mod_cache.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?view=diff&rev=450055&r1=450054&r2=450055
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Sep 26 07:12:36 2006
@@ -2,6 +2,11 @@
Changes with Apache 2.3.0
[Remove entries to the current 2.0 and 2.2 section below, when backported]
+ *) mod_cache: Don't cache requests with a expires date in the past;
+ otherwise mod_cache will always try to cache the URL. This bug
+ might lead to numerous rename() errors on win32 if the URL was
+ previously cached. [Davi Arnaut <davi haxent.com.br>]
+
*) mod_disk_cache: Make sure that only positive integers are accepted
for the CacheMaxFileSize and CacheMinFileSize parameters in the
config file. PR39380 [Niklas Edmundsson <nikke acc.umu.se>]
Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?view=diff&rev=450055&r1=450054&r2=450055
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Tue Sep 26 07:12:36 2006
@@ -445,6 +445,11 @@
/* if a broken Expires header is present, don't cache it */
reason = apr_pstrcat(p, "Broken expires header: ", exps, NULL);
}
+ else if (exp != APR_DATE_BAD && exp < r->request_time)
+ {
+ /* if a Expires header is in the past, don't cache it */
+ reason = "Expires header already expired, not cacheable";
+ }
else if (r->args && exps == NULL) {
/* if query string present but no expiration time, don't cache it
* (RFC 2616/13.9)