On 5/17/07, Ruediger Pluem <[EMAIL PROTECTED]> wrote:
But it already does in the case of the Expires header. If the Expires
header is missing or bogus and no max-age field is present (valid or invalid),
we set one with the expires date the cache calculated (either heuristic or
default). And this creates the next question for me: Why always use the default
expire setting in the case of a bogus max-age? In the case of a bogus Expire
header we try to calculate a heuristic expiration date using the Last-Modified
header (if present and valid).
I think we should handle Expires and max-age in the same way here.

My concern with falling back to the Last-Modified date on a bogus
Cache-Control max-age field is that the server was *trying* to tell us
something via the max-age field.  So, falling back to Last-Modified
seems wrong-ish.  I'd rather just stay silent here and go with our
default value.

BTW, I'm not a fan of us inventing Expires headers in this section of
code - I'd think it'd be far cleaner to off-load Expires response
header generation to mod_expires and leave the cache out of it
entirely - inventing Expires values deep inside of mod_cache seems
unclean.  mod_cache, IMO, should just respect what it is told and not
change how things appear to downstream folks.  (mod_expires is more
than capable of inserting in the Expires header if the admin wants
it.)

> shouldn't tweak the value under any circumstances.
>
> I can be convinced that's the wrong approach and that we should indeed
> normalize it in the event of an error, but my gut says letting is just
> pass-through seems right.  -- justin

But shouldn't the client have the same expiration expectation as the cache?
In the case of an invalid max-age field I would see it as a correct decision
by a client to ignore it completely for its local cache and thus possibly
do not cache it at all.

Since the cache is not authoritative, I think it's slightly sketchy
for us to tweak any downstream value based on our local policy
decisions.

Does my position make sense?  I'm of the opinion that we should go one
of two ways:

- mod_cache shouldn't touch the response - so it stops setting Expires
or anything like that which affects cachability

- mod_cache always tweaks the response - so my CC: max-age fix needs
to mimic what we do for Expires.

WDYT?  -- justin

Reply via email to