Bug 208257

Summary: Add SPI _WKResourceLoadDelegate willSendRequest
Product: WebKit Reporter: David Moore <david_a_moore>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: achristensen, david_a_moore
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch achristensen: review-

Description David Moore 2020-02-26 13:26:32 PST
_WKResourceLoadDelegate does not currently provide a method for signing URL requests for sub-resource loads. A willSendRequest SPI should be added to _WKResourceLoadDelegate to provide an opportunity to attach dynamic headers (i.e., cryptographic signatures).

Sharing the existing _WKResourceLoadDelegate infrastructure, -[WKResourceLoadDelegate webView:resourceLoad:willSendRequest:] will return an NSURLRequest synchronously via the delegate implementation.
Comment 1 David Moore 2020-02-26 15:45:37 PST
Created attachment 391792 [details]
Patch
Comment 2 David Moore 2020-02-26 16:12:49 PST
Builds are failing due to a last minute formatting change to pass the style requirements.
Comment 3 David Moore 2020-02-26 16:26:54 PST
Created attachment 391804 [details]
Patch
Comment 4 David Moore 2020-02-26 18:28:06 PST
Created attachment 391828 [details]
Patch
Comment 5 Alex Christensen 2020-02-26 20:03:00 PST
Comment on attachment 391828 [details]
Patch

_WKResourceLoadDelegate callbacks are intentionally informative only.  Waiting for this roundtrip will considerably hurt performance when a resource load delegate is set.