Bug 21392 - Protocol Violation: Expires should be overridden by Max-age directive
Summary: Protocol Violation: Expires should be overridden by Max-age directive
Status: CLOSED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cache (show other bugs)
Version: 2.0.46
Hardware: All other
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-08 05:15 UTC by Srinivasa Ragavan
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments
if and only if maxage = -1 (NOT Specified), then Expires header is taken into account (1.15 KB, patch)
2003-07-08 05:25 UTC, Srinivasa Ragavan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Srinivasa Ragavan 2003-07-08 05:15:15 UTC
When the proxy server sends max-age and Expires for a response like

     Cache-Control: max-age=10
     Expires: <some future date>

After 10 seconds this response should be stale in the proxy cache. But
The server still responds from the cache because of Expires header. It is not 
overridded as per the RFC.

"If a response includes both an Expires header and a max-age
directive, the max-age directive overrides the Expires header, even
if the Expires header is more restrictive. This rule allows an origin
server to provide, for a given response, a longer expiration time to
an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache."

When max-age is specified, the expiration comparison should not include EXPIRES 
header.
Comment 1 Srinivasa Ragavan 2003-07-08 05:25:56 UTC
Created attachment 7149 [details]
if and only if maxage = -1 (NOT Specified), then Expires header is taken into account
Comment 2 Paul J. Reder 2003-07-08 13:35:09 UTC
This issue has already been diagnosed and has already been addressed in the
2.1-dev branch. Thank you for your effort in diagnosing this issue.