httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Gerrard <>
Subject [users@httpd] mod_cache ignores max-age / s-maxage headers if expires is set in the past
Date Wed, 02 Sep 2009 18:18:09 GMT

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

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 Gerrard

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message