Bug 161952

Summary: Media preloaded data cannot be reused from MemoryCache
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: eric.carlson, jer.noble
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description youenn fablet 2016-09-14 01:33:10 PDT
Media can be preloaded using <link rel=preload as=media>.
This allows creating a CachedRawResource in MemoryStore.
But this is not reused when loading the resource through video element
Comment 1 youenn fablet 2016-09-14 01:39:07 PDT
I tried activating this by doing a few fixed:
- checking for existing resources even if request does not allowCaching. I guess the allowCaching option is mostly due to not add a MemoryCache entry. But if we have one, then we should use it
- disabling some cache raw reuse entries
- fixing a small bug in reusing a CachedRawResource for MediaResource

At the end, the data is conveyed to the platform media loader.
When the response is set to the platform media loader, the decision is to cancel the load, probably in Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm receivedResponse.

Any idea what is going on here?