Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Implement FetchMetadata Site
https://bugs.webkit.org/show_bug.cgi?id=238265 Reviewed by Youenn Fablet. This implements the Sec-Fetch-Site header as part of FetchMetadata. The site is computed on first use in the CachedResourceLoader and then tracked in the SubResourceLoader through redirects. The test results are only accurate on the GLib ports as they run under the web-platform.test domains which can test proper same-site relationships as well as non-trustworthy domains (localhost is always trusted). * LayoutTests/TestExpectations: * LayoutTests/http/wpt/fetch/fetch-metadata-same-origin-redirect-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/fetch-via-serviceworker--fallback.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/fetch-via-serviceworker--respondWith.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/fetch.https.sub.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/fetch.https.sub.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/fetch.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/font.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/form.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/iframe.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/iframe.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/img.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/navigation.https.sub-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/redirect/multiple-redirect-https-downgrade-upgrade.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/redirect/redirect-http-upgrade.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/redirect/redirect-https-downgrade.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/script.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/script.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/serviceworker.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/sharedworker.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/unload.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/window-open.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/worker.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fetch/metadata/xslt.https.sub-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/navigation-headers.https-expected.txt: * Source/WebCore/loader/CrossOriginAccessControl.cpp: (WebCore::cleanHTTPRequestHeadersForAccessControl): * Source/WebCore/loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::SubresourceLoader): (WebCore::SubresourceLoader::willSendRequestInternal): * Source/WebCore/loader/SubresourceLoader.h: * Source/WebCore/loader/cache/CachedResourceLoader.cpp: (WebCore::convertEnumerationToString): (WebCore::updateRequestFetchMetadataHeaders): (WebCore::CachedResourceLoader::computeFetchMetadataSite): (WebCore::CachedResourceLoader::updateRequestAfterRedirection): (WebCore::CachedResourceLoader::updateHTTPRequestHeaders): * Source/WebCore/loader/cache/CachedResourceLoader.h: * Source/WebCore/loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::updateFetchMetadataHeaders): Deleted. * Source/WebCore/loader/cache/CachedResourceRequest.h: * Source/WebCore/page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::isSameSiteAs const): * Source/WebCore/page/SecurityOrigin.h: * Source/WebCore/platform/network/HTTPHeaderNames.in: Canonical link: https://commits.webkit.org/255810@main
- Loading branch information
Showing
58 changed files
with
755 additions
and
321 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
PASS This page's top-level navigation. | ||
PASS undefined: sec-fetch-dest | ||
PASS undefined: sec-fetch-mode | ||
PASS undefined: sec-fetch-site | ||
PASS undefined: sec-fetch-user | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.