mod_cache ignores max-age / s-maxage headers if expires is set in the past

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've noticed that if an expires header is set in the past then mod_cache will not cache the response even if s-maxage is set in the cache-control header.  Isn't this contrary to the HTTP 1.1 specification?

"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."

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3

Not caching responses with an expires header in the past seems to have been added deliberately in version 2.2.5.  The HTTP specification says it is valid to set conflicting expires and maxage / s-maxage settings to obtain different behaviour for HTTP 1.0 and HTTP 1.1 clients.  I'm using a caching product on my web server that behaves like this - hence I've noticed the problem.

I think I have a workaround but wanted to post something in case it is a bug.

Anthony
_______________________________________

Anthony Gerrard
Email: anthonygerrard@xxxxxxxxx
http://www.sponsorachild.org.uk

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux