httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35247] - cache ignores s-maxage (in responses with max-age)
Date Sat, 03 Jun 2006 13:55:30 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35247>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35247


otaylor@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |otaylor@redhat.com




------- Additional Comments From otaylor@redhat.com  2006-06-03 13:55 -------
I noticed this when reading through the code;  the code in question
(from cache-util.c is)

   if (((smaxage != -1) && (age < (smaxage - minfresh))) ||
        ((maxage != -1) && (age < (maxage + maxstale - minfresh))) ||
        ((smaxage == -1) && (maxage == -1) && /* check expires */...

It may be a simple oversight that the second clause doesn't have
a (smaxage == 1). Certainly RFC 2616 implies that the above is wrong:

  If a response includes an s-maxage directive, then for a shared cache 
  (but not for a private cache), the maximum age specified by this directive 
  overrides the maximum age specified by either the max-age directive or 
  the Expires header. The s-maxage directive also implies the semantics of 
  the proxy-revalidate directive (see section 14.9.4), i.e., that the shared 
  cache must not use the entry after it becomes stale to respond to a 
  subsequent request without first revalidating it with the origin server. 
  The s- maxage directive is always ignored by a private cache.

That implies to me that if s-maxage is set, it should also override any
max-age passed in the request. If s-maxage only is supposed to override 
max-age in the cached response, then a slightly more complicated fix would
be needed.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message