<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>24179</bug_id>
          
          <creation_ts>2009-02-25 18:04:13 -0800</creation_ts>
          <short_desc>HTTP: max-age/Expires ignored if must-revalidate sent</short_desc>
          <delta_ts>2009-04-08 04:35:40 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://mrclay.org/tests/mustRevalidateTest/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Steve Clay">steve</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>koivisto</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>111091</commentid>
    <comment_count>0</comment_count>
    <who name="Steve Clay">steve</who>
    <bug_when>2009-02-25 18:04:13 -0800</bug_when>
    <thetext>If the Cache-Control directive &quot;must-revalidate&quot; is included, Win/Safari 4b and the latest nightly ignore the Expires header and max-age directive and send a conditional GET each time a resource is needed.

must-revalidate defines behavior AFTER a cache becomes stale. FF3, IE8, O9.6, Chrome and Safari 3.2.2 behave correctly, only sending a conditional GET after the Expires time.

Ignoring max-age is a long-standing webkit bug, but now Expires is being ignored as well.

More here: http://mrclay.org/index.php/2009/02/24/safari-4-beta-cache-controlmust-revalidate-bug/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111095</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2009-02-25 18:27:13 -0800</bug_when>
    <thetext>&lt;rdar://problem/6624445&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116864</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-04-08 04:35:40 -0700</bug_when>
    <thetext>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 &lt;http://mrclay.org/tests/mustRevalidateTest/&gt; 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 &quot;http://mrclay.org/tests/mustRevalidateTest/css.php&quot; --header &quot;If-Modified-Since: Thu, 2Feb 2009 01:28:11 GMT&quot; 
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: &quot;1235611691pub&quot;
Expires: Thu, 09 Apr 2009 11:09:44 GMT
Cache-Control: max-age=86000, public, must-revalidate

$ curl -i &quot;http://mrclay.org/tests/mustRevalidateTest/css.php&quot; --header &quot;If-Modified-Since: Thu, 26 Feb 2009 01:28:11 GMT&quot; --header &apos;If-None-Match: &quot;1235611691pub&quot;&apos;
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: &quot;1235611691pub&quot;
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&apos;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 &quot;Cache-Control: must-revalidate&quot; 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&apos;t confirm that anything has changed in this regard between Safari 3 and Safari 4, I&apos;m closing this bug as INVALID. Please let me know if I overlooked something.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>