No-Cors check should take into account same-origin
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Sep 2019 10:40:02 +0000 (10:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Sep 2019 10:40:02 +0000 (10:40 +0000)
commit53f1824bf8eb215467892fc7eb90b8d2d621df41
tree5a5d596cc669ac3db8fc9b162471e5475e6561fb
parent911accbed10df9c89c745ab77e2ea2f1ccf58f10
No-Cors check should take into account same-origin
https://bugs.webkit.org/show_bug.cgi?id=202353

Patch by Rob Buis <rbuis@igalia.com> on 2019-09-30
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/redirect/redirect-mode-expected.txt: Removed.
* web-platform-tests/fetch/api/redirect/redirect-mode.any-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-mode.any.worker-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt:

Source/WebCore:

No-Cors check should take into account same-origin, in that case the
check should bail out, since same-origin is already handled in
the first step of [1].

Test: imported/web-platform-tests/fetch/api/redirect/redirect-mode.any.html

[1] https://fetch.spec.whatwg.org/#main-fetch Step 5

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any-expected.txt
LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.worker-expected.txt
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedResourceLoader.cpp