Bug 199064 - WKURLSchemeHandler does't run the CORS rule
Summary: WKURLSchemeHandler does't run the CORS rule
Status: RESOLVED DUPLICATE of bug 205198
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-20 02:08 PDT by Jin
Modified: 2019-12-13 13:52 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jin 2019-06-20 02:08:31 PDT
When I setup a WKURLSchemeHandler with my custom Scheme, then send a XMLHTTPURLRequst .
Just like the following code:

var request = new XMLHttpRequest();
request.open('GET', 'https://www.apple.com/ac/globalnav/3/en_US/images/globalnav/search/image_small.svg', false);
request.send(null);


Webkit send the request immediately, but not send a Option request to www.apple.com which the CORS rule needed.


I hope WKURLSchemeHandler  should support CORS in the feature.
Comment 1 Radar WebKit Bug Importer 2019-06-20 13:41:25 PDT
<rdar://problem/51957846>
Comment 2 Jin 2019-06-20 23:07:27 PDT
(In reply to Jin from comment #0)
> When I setup a WKURLSchemeHandler with my custom Scheme, then send a
> XMLHTTPURLRequst .
> Just like the following code:
> 
> var request = new XMLHttpRequest();
> request.open('GET',
> 'https://www.apple.com/ac/globalnav/3/en_US/images/globalnav/search/
> image_small.svg', false);
> request.send(null);
> 
> 
> Webkit send the request immediately, but not send a Option request to
> www.apple.com which the CORS rule needed.
> 
> 
> I hope WKURLSchemeHandler  should support CORS in the feature.

For Example:
Load request with "uc://www.google.com"
Then send a Sync XMLHttpRequest request 'https://www.apple.com/ac/globalnav/3/en_US/images/globalnav/search/image_small.svg'

The XMLHttpRequest just send to apple.com.

But if a send it with ASync mode , it will check the CORS rule
Comment 3 Alex Christensen 2019-12-13 13:52:40 PST

*** This bug has been marked as a duplicate of bug 205198 ***