httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r463496 - in /httpd/httpd/branches/2.2.x: CHANGES modules/cache/mod_cache.c
Date Thu, 12 Oct 2006 23:03:19 GMT
Author: minfrin
Date: Thu Oct 12 16:03:17 2006
New Revision: 463496

URL: http://svn.apache.org/viewvc?view=rev&rev=463496
Log:
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.

+1: minfrin, rpluem, jim

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?view=diff&rev=463496&r1=463495&r2=463496
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Oct 12 16:03:17 2006
@@ -1,6 +1,11 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.4
 
+  *) 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>]
+
   *) core: Deal with the widespread use of apr_status_t return values
      as HTTP status codes, as documented in PR#31759 (a bug shared by
      the default handler, mod_cgi, mod_cgid, mod_proxy, and probably

Modified: httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c?view=diff&rev=463496&r1=463495&r2=463496
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c (original)
+++ httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c Thu Oct 12 16:03:17 2006
@@ -426,6 +426,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)



Mime
View raw message