Bug 208257 - Add SPI _WKResourceLoadDelegate willSendRequest
Summary: Add SPI _WKResourceLoadDelegate willSendRequest
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-26 13:26 PST by David Moore
Modified: 2020-02-26 20:03 PST (History)
2 users (show)

See Also:


Attachments
Patch (25.45 KB, patch)
2020-02-26 15:45 PST, David Moore
no flags Details | Formatted Diff | Diff
Patch (25.45 KB, patch)
2020-02-26 16:26 PST, David Moore
no flags Details | Formatted Diff | Diff
Patch (26.54 KB, patch)
2020-02-26 18:28 PST, David Moore
achristensen: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.