<?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>172646</bug_id>
          
          <creation_ts>2017-05-26 08:01:35 -0700</creation_ts>
          <short_desc>Abort HTTP/2 push streams if the item is already in the HTTP cache</short_desc>
          <delta_ts>2017-05-27 04:57:45 -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>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jake Archibald">jaffathecake</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>beidson</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1313132</commentid>
    <comment_count>0</comment_count>
    <who name="Jake Archibald">jaffathecake</who>
    <bug_when>2017-05-26 08:01:35 -0700</bug_when>
    <thetext>Chrome is getting ready to ship this https://bugs.chromium.org/p/chromium/issues/detail?id=232040, and as far as I can tell, Edge already shipped it.

Currently Safari *sometimes* rejects push streams if the item is in the HTTP/2 push cache. As far as I can tell, it&apos;ll abort the stream if all of the following is true:

* The item in the push cache is &apos;fresh&apos; according to cache headers
* The user did not hit &apos;refresh&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313316</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-05-26 17:14:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/32437593&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313350</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2017-05-26 19:58:18 -0700</bug_when>
    <thetext>There might be cases where it makes sense to process the pushed content, for instance if the push purpose is to refresh or invalidate the cache.
There might be other edge cases as the push cache may be different from the http cache. For instance, a request bypassing the HTTP cache might not bypass the push cache.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313395</commentid>
    <comment_count>3</comment_count>
    <who name="Jake Archibald">jaffathecake</who>
    <bug_when>2017-05-27 04:57:13 -0700</bug_when>
    <thetext>I agree the spec isn&apos;t clear when the push should be cancelled. There&apos;s some discussion of this in the Chrome issue, eg https://bugs.chromium.org/p/chromium/issues/detail?id=232040#c62

Personally, it enters a grey area when the pushed resource is clearly fresher than the item in the HTTP cache (from last-modified or etag headers).

However, it seems pretty clear-cut if the pushed item has the same last-modified/etag header as the item in the HTTP cache - continuing to receive this is a waste of bandwidth.

If the item in the cache is fresh, and it isn&apos;t clear if the pushed item is fresher, rejecting the stream still feels like the right thing to do, as HTTP/1 users would use the cached item.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313396</commentid>
    <comment_count>4</comment_count>
    <who name="Jake Archibald">jaffathecake</who>
    <bug_when>2017-05-27 04:57:45 -0700</bug_when>
    <thetext>I threw together a little test server at https://github.com/jakearchibald/http2-push-test - this may help.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>