Bug 204288

Summary: H2 push cache bypassed for partial object requests
Product: WebKit Reporter: Will Law <wilaw>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: achristensen, beidson, jer.noble, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test conducted against H2 push cache none

Description Will Law 2019-11-17 20:57:14 PST
Created attachment 383728 [details]
Test conducted against H2 push cache

[Jer Noble suggested I file this bug against Webkit rather than Safari, although testing was on Safari/Mac]

The H2 push cache is not being leveraged when partial object requests are made. The attachment describes a series of tests in which both full and partial objects were pushed via H2 to the browser and then full and partial requests made. In all partial request cases, the local H2 push cache was bypassed and the request was fulfilled by the origin.

In the case of an object of 10k bytes where we push the byte range 1000-2000 to the client browser, we would expect the following behavior in a subsequent request:
1. If a partial object request is made for the range 1000-2000, the request should be fulfilled by the H2 cache which contains all the necessary bytes
2. If a partial object request is made for the range 0-500, the request should be fulfilled by the origin
3. If a partial object request is made for the range 500 - 2500,  the request should be fulfilled by origin requests for 500-999, and 1001-2500 and then the remaining bytes should be served from, the local h2 push cache. 

In the case of an object of 10k bytes where we push the entire object to the client browser, we would expect the following behavior in a subsequent request:
1. If a partial object request is made for the range 1000-2000, the request should be fulfilled by the H2 cache which contains all the necessary bytes
Comment 1 Radar WebKit Bug Importer 2019-11-19 16:46:20 PST
<rdar://problem/57342430>