Bug 189251 - Add helper function to create a potential CORS request
Summary: Add helper function to create a potential CORS request
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-03 16:42 PDT by Daniel Bates
Modified: 2018-09-04 10:13 PDT (History)
4 users (show)

See Also:


Attachments
Patch (17.69 KB, patch)
2018-09-03 16:56 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-09-03 16:42:57 PDT
CachedResourceRequest::setAsPotentiallyCrossOrigin() mixes the concepts of CORS settings states (No CORS, Anonymous and Use Credentials) and module script credentials mode ("omit", "same-origin", and "include") into an algorithm that has a passing resemblance of the algorithm Create a potential-CORS request from the HTML standard: <https://html.spec.whatwg.org/multipage/urls-and-fetching.html#create-a-potential-cors-request> (31 August 2018). Although the standard describes a mapping between CORS settings states and module script credentials modes it is error prone and confusing for setAsPotentiallyCrossOrigin() to support both concepts, called a "cross origin mode", as input to it. We should separate these concepts and more closely implement the algorithm Create a potential-CORS request from the HTML standard.
Comment 1 Daniel Bates 2018-09-03 16:56:40 PDT
Created attachment 348795 [details]
Patch
Comment 2 Daniel Bates 2018-09-04 10:11:10 PDT
Comment on attachment 348795 [details]
Patch

Clearing flags on attachment: 348795

Committed r235617: <https://trac.webkit.org/changeset/235617>
Comment 3 Daniel Bates 2018-09-04 10:11:11 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2018-09-04 10:13:02 PDT
<rdar://problem/44101478>