Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 17964 invoked from network); 24 Jul 2006 00:51:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Jul 2006 00:51:39 -0000 Received: (qmail 64781 invoked by uid 500); 24 Jul 2006 00:51:25 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 64720 invoked by uid 500); 24 Jul 2006 00:51:24 -0000 Mailing-List: contact dev-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 dev@httpd.apache.org Received: (qmail 64662 invoked by uid 99); 24 Jul 2006 00:51:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jul 2006 17:51:24 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [65.99.219.155] (HELO haxent.com) (65.99.219.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jul 2006 17:51:18 -0700 Received: from montefiori (unknown [201.21.156.184]) by haxent.com (Postfix) with ESMTP id D907830891 for ; Sun, 23 Jul 2006 21:50:57 -0300 (BRT) Received: by montefiori (Postfix, from userid 500) id 095251090A8; Sun, 23 Jul 2006 21:51:00 -0300 (BRT) Message-Id: <20060724005059.661687000@haxent.com.br> References: <20060724005030.415874000@haxent.com.br> User-Agent: quilt/0.45-1 Date: Sun, 23 Jul 2006 21:50:31 -0300 From: Davi Arnaut To: dev@httpd.apache.org Subject: [patch 01/10] dont cache expired objects Content-Disposition: inline; filename=001.patch X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Don't cache requests with a expires date in the past; otherwise the cache code will _always_ try to cache the URL, leading to numerous rename() errors on win32 since the URL is already cached. Index: trunk/modules/cache/mod_cache.c =================================================================== --- trunk.orig/modules/cache/mod_cache.c +++ trunk/modules/cache/mod_cache.c @@ -426,6 +426,11 @@ static int cache_save_filter(ap_filter_t /* if a broken Expires header is present, don't cache it */ reason = apr_pstrcat(p, "Broken expires header: ", exps, NULL); } + else if (exps != NULL && 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) --