You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by po...@apache.org on 2009/10/29 18:06:16 UTC
svn commit: r831031 - in /httpd/httpd/branches/2.2.x: ./ CHANGES STATUS
docs/manual/caching.xml modules/cache/mod_cache.c
Author: poirier
Date: Thu Oct 29 17:06:15 2009
New Revision: 831031
URL: http://svn.apache.org/viewvc?rev=831031&view=rev
Log:
Merge r823536, r823563 from trunk:
mod_cache: add Cache-control: s-maxage to cacheability decisions per RFC 2616.
Update doc to match change to mod_cache to include s-maxage in
some cacheability decisions.
Reviewed by: poirier
Modified:
httpd/httpd/branches/2.2.x/ (props changed)
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/STATUS
httpd/httpd/branches/2.2.x/docs/manual/caching.xml
httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c
Propchange: httpd/httpd/branches/2.2.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct 29 17:06:15 2009
@@ -1 +1 @@
-/httpd/httpd/trunk:395552,451572,583817,583830,611483,630858,639005,639010,647395,657354,657459,660461,660566,664330,678761,680082,681190,682369,683626,685112,686805,686809,687099,687754,693120,693392,693727-693728,696006,697093,706318,707163,708902,711421,719357,720250,729316-729317,729586,732414,732504,732832,733127,733134,733218-733219,734710,743589,755190,756671,756675,756678,756683,757741,761329,763394,764239,768535,769809,771587,771610,776325,777042,777091,778438-778439,778531,778942,780648,780655,780692,780697,780699,785661,790587,803704
+/httpd/httpd/trunk:395552,451572,583817,583830,611483,630858,639005,639010,647395,657354,657459,660461,660566,664330,678761,680082,681190,682369,683626,685112,686805,686809,687099,687754,693120,693392,693727-693728,696006,697093,706318,707163,708902,711421,719357,720250,729316-729317,729586,732414,732504,732832,733127,733134,733218-733219,734710,743589,755190,756671,756675,756678,756683,757741,761329,763394,764239,768535,769809,771587,771610,776325,777042,777091,778438-778439,778531,778942,780648,780655,780692,780697,780699,785661,790587,803704,823536,823563
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=831031&r1=831030&r2=831031&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Oct 29 17:06:15 2009
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.15
+ *) mod_cache: correctly consider s-maxage in cacheability
+ decisions. [Dan Poirier]
+
*) core: Return APR_EOF if request body is shorter than the length announced
by the client. PR 33098 [ Stefan Fritsch <sf sfritsch.de>]
Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=831031&r1=831030&r2=831031&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Thu Oct 29 17:06:15 2009
@@ -87,14 +87,6 @@
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_cache: treat s-maxage as an explicit expiration in cacheability
- decisions, per RFC 2616
- Trunk Patch: http://svn.apache.org/viewvc?rev=823536&view=rev
- http://svn.apache.org/viewvc?rev=823563&view=rev
- 2.2.x Patch: http://people.apache.org/~poirier/smaxage.patch
- (trunk patch works, except for CHANGES)
- +1: poirier, sf, covener
-
* mod_rewrite: don't fully qualify hostname:port if the request is a CONNECT
request
Trunk Patch: http://svn.apache.org/viewvc?view=rev&revision=822004
Modified: httpd/httpd/branches/2.2.x/docs/manual/caching.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/caching.xml?rev=831031&r1=831030&r2=831031&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/caching.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/caching.xml Thu Oct 29 17:06:15 2009
@@ -251,12 +251,15 @@
in the "Cache-Control:" header.</li>
<li>If the URL included a query string (e.g. from a HTML form GET
- method) it will not be cached unless the response includes an
- "Expires:" header, as per RFC2616 section 13.9.</li>
+ method) it will not be cached unless the response specifies an
+ explicit expiration by including an "Expires:" header or the max-age
+ or s-maxage directive of the "Cache-Control:" header, as per RFC2616
+ sections 13.9 and 13.2.1.</li>
<li>If the response has a status of 200 (OK), the response must
also include at least one of the "Etag", "Last-Modified" or
- the "Expires" headers, unless the
+ the "Expires" headers, or the max-age or s-maxage directive of
+ the "Cache-Control:" header, unless the
<directive module="mod_cache">CacheIgnoreNoLastMod</directive>
directive has been used to require otherwise.</li>
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?rev=831031&r1=831030&r2=831031&view=diff
==============================================================================
--- 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 29 17:06:15 2009
@@ -473,7 +473,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)
*/
@@ -487,14 +488,17 @@
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.
+ * Etag, Expires, Cache-Control:max-age, or Cache-Control:s-maxage
+ * 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 */
Re: svn commit: r831031 - in /httpd/httpd/branches/2.2.x: ./ CHANGES
STATUS docs/manual/caching.xml modules/cache/mod_cache.c
Posted by Ruediger Pluem <rp...@apache.org>.
On 10/30/2009 01:18 PM, Dan Poirier wrote:
> Jeff Trawick <tr...@gmail.com> writes:
>
>> On Thu, Oct 29, 2009 at 1:06 PM, <po...@apache.org> wrote:
>>> Author: poirier
>>> Date: Thu Oct 29 17:06:15 2009
>>> New Revision: 831031
>>>
>>> URL: http://svn.apache.org/viewvc?rev=831031&view=rev
>>> Log:
>>> Merge r823536, r823563 from trunk:
> ...
>>> Reviewed by: poirier
>> The value for "Reviewed by" should be the two or more people in this
>> list other than the author:
>>
>> +1: poirier, sf, covener
>
> Makes sense; fixed.
>
> I used http://people.apache.org/~jorton/svn.merge to do this backport
> merge, which is where the "Reviewed by: poirier" came from. Is there an
> updated version of that or another script for doing the routine work
> of a backport?
Not that I am aware of, but Joe's script is really good. Usually there
are two things of manual work left:
1. Fix the CHANGES entry.
2. Fix the 'Reviewed by' in the clog file.
The script takes care of the remaining parts.
Regards
RĂ¼diger
Re: svn commit: r831031 - in /httpd/httpd/branches/2.2.x: ./ CHANGES
STATUS docs/manual/caching.xml modules/cache/mod_cache.c
Posted by Dan Poirier <po...@pobox.com>.
Jeff Trawick <tr...@gmail.com> writes:
> On Thu, Oct 29, 2009 at 1:06 PM, <po...@apache.org> wrote:
>> Author: poirier
>> Date: Thu Oct 29 17:06:15 2009
>> New Revision: 831031
>>
>> URL: http://svn.apache.org/viewvc?rev=831031&view=rev
>> Log:
>> Merge r823536, r823563 from trunk:
...
>> Reviewed by: poirier
>
> The value for "Reviewed by" should be the two or more people in this
> list other than the author:
>
> +1: poirier, sf, covener
Makes sense; fixed.
I used http://people.apache.org/~jorton/svn.merge to do this backport
merge, which is where the "Reviewed by: poirier" came from. Is there an
updated version of that or another script for doing the routine work
of a backport?
Dan
Re: svn commit: r831031 - in /httpd/httpd/branches/2.2.x: ./ CHANGES
STATUS docs/manual/caching.xml modules/cache/mod_cache.c
Posted by Jeff Trawick <tr...@gmail.com>.
On Thu, Oct 29, 2009 at 1:06 PM, <po...@apache.org> wrote:
> Author: poirier
> Date: Thu Oct 29 17:06:15 2009
> New Revision: 831031
>
> URL: http://svn.apache.org/viewvc?rev=831031&view=rev
> Log:
> Merge r823536, r823563 from trunk:
>
> mod_cache: add Cache-control: s-maxage to cacheability decisions per RFC 2616.
>
> Update doc to match change to mod_cache to include s-maxage in
> some cacheability decisions.
>
> Reviewed by: poirier
The value for "Reviewed by" should be the two or more people in this
list other than the author:
+1: poirier, sf, covener