Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 41122 invoked from network); 8 Oct 2009 19:34:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Oct 2009 19:34:44 -0000 Received: (qmail 57208 invoked by uid 500); 8 Oct 2009 19:34:43 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 57130 invoked by uid 500); 8 Oct 2009 19:34:43 -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 57121 invoked by uid 99); 8 Oct 2009 19:34:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 19:34:43 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 32.97.182.141 is neither permitted nor denied by domain of poirier@pobox.com) Received: from [32.97.182.141] (HELO e1.ny.us.ibm.com) (32.97.182.141) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 19:34:31 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e1.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id n98JWtme008105 for ; Thu, 8 Oct 2009 15:32:55 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n98JY77P246074 for ; Thu, 8 Oct 2009 15:34:07 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n98JY7wh020785 for ; Thu, 8 Oct 2009 15:34:07 -0400 Received: from slappy.raleigh.ibm.com (slappy.raleigh.ibm.com [9.37.243.169]) by d01av04.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n98JY6Jx020754; Thu, 8 Oct 2009 15:34:07 -0400 From: Dan Poirier To: dev@httpd.apache.org Subject: Re: Cacheability and s-maxage References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (darwin) Date: Thu, 08 Oct 2009 15:34:06 -0400 In-Reply-To: (Dan Poirier's message of "Thu, 08 Oct 2009 14:59:02 -0400") Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Virus-Checked: Checked by ClamAV on apache.org --=-=-= And here's the right patch file, sorry. -- Dan Poirier --=-=-= Content-Disposition: attachment; filename=trunk.patch.txt Content-Description: s-maxage patch Index: mod_cache.c =================================================================== --- mod_cache.c (revision 821763) +++ mod_cache.c (working copy) @@ -767,7 +767,8 @@ reason = "Expires header already expired, not cacheable"; } else if (!conf->ignorequerystring && r->parsed_uri.query && exps == NULL && - !ap_cache_liststr(NULL, cc_out, "max-age", NULL)) { + !ap_cache_liststr(NULL, cc_out, "max-age", NULL) && + !ap_cache_liststr(NULL, cc_out, "s-maxage", NULL)) { /* if a query string is present but no explicit expiration time, * don't cache it (RFC 2616/13.9 & 13.2.1) */ @@ -781,14 +782,16 @@ reason = "HTTP Status 304 Not Modified"; } else if (r->status == HTTP_OK && lastmods == NULL && etag == NULL - && (exps == NULL) && (conf->no_last_mod_ignore ==0)) { + && (exps == NULL) && (conf->no_last_mod_ignore ==0) && + !ap_cache_liststr(NULL, cc_out, "max-age", NULL) && + !ap_cache_liststr(NULL, cc_out, "s-maxage", NULL)) { /* 200 OK response from HTTP/1.0 and up without Last-Modified, * Etag, or Expires headers. */ /* Note: mod-include clears last_modified/expires/etags - this * is why we have an optional function for a key-gen ;-) */ - reason = "No Last-Modified, Etag, or Expires headers"; + reason = "No Last-Modified, Etag, Expires, Cache-Control:max-age or Cache-Control:s-maxage headers"; } else if (r->header_only && !cache->stale_handle) { /* Forbid HEAD requests unless we have it cached already */ --=-=-=--