Summary: | HTTP: max-age/Expires ignored if must-revalidate sent | ||
---|---|---|---|
Product: | WebKit | Reporter: | Steve Clay <steve> |
Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | ap, koivisto |
Priority: | P2 | Keywords: | InRadar, Regression |
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Windows XP | ||
URL: | http://mrclay.org/tests/mustRevalidateTest/ |
Description
Steve Clay
2009-02-25 18:04:13 PST
In my testing, Safari 3.2.x on both Mac OS X 10.5.6 and Windows sends a conditional GET for the stylesheet in <http://mrclay.org/tests/mustRevalidateTest/> each time. It is true that visible results for this test differ between Safari 3 and 4beta, but that is caused by an unrelated change that triggers a bug in the test itself. Compare the following requests: ------------ $ curl -i "http://mrclay.org/tests/mustRevalidateTest/css.php" --header "If-Modified-Since: Thu, 2Feb 2009 01:28:11 GMT" HTTP/1.1 304 Not Modified Date: Wed, 08 Apr 2009 11:16:24 GMT Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a Phusion_Passenger/2.1.2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 ETag: "1235611691pub" Expires: Thu, 09 Apr 2009 11:09:44 GMT Cache-Control: max-age=86000, public, must-revalidate $ curl -i "http://mrclay.org/tests/mustRevalidateTest/css.php" --header "If-Modified-Since: Thu, 26 Feb 2009 01:28:11 GMT" --header 'If-None-Match: "1235611691pub"' HTTP/1.1 200 OK Date: Wed, 08 Apr 2009 11:16:28 GMT Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a Phusion_Passenger/2.1.2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 X-Powered-By: PHP/5.2.8 Expires: Thu, 09 Apr 2009 11:09:48 GMT ETag: "1235611691pub" Cache-Control: max-age=86000, public, must-revalidate Last-Modified: Thu, 26 Feb 2009 01:28:11 GMT Transfer-Encoding: chunked Content-Type: text/css #box { width:100px; height:100px; background: rgb(123,207,218); } ------------ For a request that doesn't contain a ETag conditional header, the script returns a 304 response, so it fails to detect undesired behavior. As mentioned in bug 13128, a workaround is to use Expires header - but it never worked if "Cache-Control: must-revalidate" was also sent. In my testing, an Expires header without Cache-Control works as expected in both Safari 3 and 4beta. There is no doubt that Safari behavior is not what is desired in this case, and this is tracked by Apple in a Radar bug created from bug 13128. Since I couldn't confirm that anything has changed in this regard between Safari 3 and Safari 4, I'm closing this bug as INVALID. Please let me know if I overlooked something. |