Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 31514 invoked from network); 26 Sep 2006 14:12:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Sep 2006 14:12:45 -0000 Received: (qmail 5741 invoked by uid 500); 26 Sep 2006 14:12:44 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 5693 invoked by uid 500); 26 Sep 2006 14:12:43 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 5682 invoked by uid 99); 26 Sep 2006 14:12:43 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Sep 2006 07:12:43 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=minfrin@apache.org; spf=permerror X-ASF-Spam-Status: No, hits=-9.4 required=5.0 tests=ALL_TRUSTED,NO_REAL_NAME Received-SPF: error (idunn.apache.osuosl.org: domain apache.org from 140.211.166.113 cause and error) Received: from [140.211.166.113] ([140.211.166.113:57273] helo=eris.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 14/10-11904-75539154 for ; Tue, 26 Sep 2006 07:12:39 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id BEB531A981A; Tue, 26 Sep 2006 07:12:37 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r450055 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c Date: Tue, 26 Sep 2006 14:12:37 -0000 To: cvs@httpd.apache.org From: minfrin@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060926141237.BEB531A981A@eris.apache.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 ] + *) mod_disk_cache: Make sure that only positive integers are accepted for the CacheMaxFileSize and CacheMinFileSize parameters in the config file. PR39380 [Niklas Edmundsson ] 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)