Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r235025 - Relax Request constructor around referrers
https://bugs.webkit.org/show_bug.cgi?id=168649 Patch by Rob Buis <rbuis@igalia.com> on 2018-08-20 Reviewed by Darin Adler. LayoutTests/imported/w3c: * web-platform-tests/fetch/api/policies/referrer-origin-expected.txt: * web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt: * web-platform-tests/fetch/api/policies/referrer-origin-worker-expected.txt: * web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt: Source/WebCore: Implement remaining part of fetch change whatwg/fetch#377, i.e. if "parsedReferrer’s origin is not same origin with origin", then set request’s referrer to "client", instead of throwing an exception [1]. WebKit's new behavior matches that of Chrome and Firefox. Testing is covered by existing wpt tests. [1] Step 15.3.3 of https://fetch.spec.whatwg.org/#main-fetch * Modules/fetch/FetchRequest.cpp: (WebCore::computeReferrer): LayoutTests: * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt:
- Loading branch information
1 parent
4fdf250
commit 7e455d4
Showing
9 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
PASS Request's referrer is origin | ||
FAIL Cross-origin referrer is overridden by client origin promise_test: Unhandled rejection with value: object "TypeError: Referrer is not same-origin." | ||
PASS Cross-origin referrer is overridden by client origin | ||
|
2 changes: 1 addition & 1 deletion
2
...c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
PASS Fetch in service worker: referrer with no-referrer policy | ||
FAIL Request's referrer is origin assert_equals: request's referrer is https://localhost:9443/ expected "https://localhost:9443/" but got "https://localhost:9443/fetch/api/policies/referrer-origin.js?pipe=sub" | ||
FAIL Cross-origin referrer is overridden by client origin promise_test: Unhandled rejection with value: object "TypeError: Referrer is not same-origin." | ||
FAIL Cross-origin referrer is overridden by client origin assert_equals: request's referrer is https://localhost:9443/ expected "https://localhost:9443/" but got "https://localhost:9443/fetch/api/policies/referrer-origin.js?pipe=sub" | ||
|
2 changes: 1 addition & 1 deletion
2
...ts/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-worker-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL Request's referrer is origin assert_equals: request's referrer is http://localhost:8800/ expected "http://localhost:8800/" but got "http://localhost:8800/fetch/api/policies/referrer-origin.js?pipe=sub" | ||
FAIL Cross-origin referrer is overridden by client origin promise_test: Unhandled rejection with value: object "TypeError: Referrer is not same-origin." | ||
FAIL Cross-origin referrer is overridden by client origin assert_equals: request's referrer is http://localhost:8800/ expected "http://localhost:8800/" but got "http://localhost:8800/fetch/api/policies/referrer-origin.js?pipe=sub" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters