Skip to content
Permalink
Browse files
Memory cache should not reuse resources with different credential fet…
…ch option

https://bugs.webkit.org/show_bug.cgi?id=181212

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-02
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https-expected.txt:

Source/WebCore:

Covered by rebased test.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy const):

LayoutTests:

* TestExpectations: Removing test flakiness expectation.

Canonical link: https://commits.webkit.org/197057@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf authored and webkit-commit-queue committed Jan 2, 2018
1 parent 200ea4a commit c934d7a6fb749fc31bad441414a9d6c3ab1300d5
@@ -1,3 +1,12 @@
2018-01-02 Youenn Fablet <youenn@apple.com>

Memory cache should not reuse resources with different credential fetch option
https://bugs.webkit.org/show_bug.cgi?id=181212

Reviewed by Alex Christensen.

* TestExpectations: Removing test flakiness expectation.

2018-01-02 Jiewen Tan <jiewen_tan@apple.com>

Update Credential Management API for WebAuthentication
@@ -177,9 +177,9 @@ imported/w3c/web-platform-tests/service-workers/service-worker/uncontrolled-page
imported/w3c/web-platform-tests/service-workers/service-worker/websocket.https.html [ Pass Failure ]
imported/w3c/web-platform-tests/service-workers/service-worker/windowclient-navigate.https.html [ Pass Failure ]
imported/w3c/web-platform-tests/streams/readable-byte-streams/detached-buffers.serviceworker.https.html [ Pass Failure ]
imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html [ DumpJSConsoleLogInStdErr Pass Failure ]
imported/w3c/web-platform-tests/service-workers/service-worker/update.https.html [ Pass Failure ]

imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html [ DumpJSConsoleLogInStdErr ]
imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting.https.html [ DumpJSConsoleLogInStdErr ]
imported/w3c/web-platform-tests/service-workers/service-worker/fetch-response-taint.https.html [ DumpJSConsoleLogInStdErr ]
[ Debug ] imported/w3c/web-platform-tests/service-workers/service-worker/getregistrations.https.html [ Slow ]
@@ -1,3 +1,12 @@
2018-01-02 Youenn Fablet <youenn@apple.com>

Memory cache should not reuse resources with different credential fetch option
https://bugs.webkit.org/show_bug.cgi?id=181212

Reviewed by Alex Christensen.

* web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https-expected.txt:

2018-01-02 Jiewen Tan <jiewen_tan@apple.com>

Update Credential Management API for WebAuthentication
@@ -1,4 +1,3 @@


FAIL Verify CORS XHR of fetch() in a Service Worker assert_equals: expected "finish" but got "failure:Result of url:https://localhost:9443/service-workers/service-worker/resources/fetch-access-control.py?mode=cors&url=https%3A%2F%2F127.0.0.1%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Ffetch-access-control.py%3FACAOrigin%3Dhttps%3A%2F%2Flocalhost%3A9443 with_credentials: true must be FAIL but SUCCESS"
PASS Verify CORS XHR of fetch() in a Service Worker

@@ -1,3 +1,15 @@
2018-01-02 Youenn Fablet <youenn@apple.com>

Memory cache should not reuse resources with different credential fetch option
https://bugs.webkit.org/show_bug.cgi?id=181212

Reviewed by Alex Christensen.

Covered by rebased test.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy const):

2018-01-02 Jiewen Tan <jiewen_tan@apple.com>

Update Credential Management API for WebAuthentication
@@ -1116,7 +1116,7 @@ CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida
// This helps with the case where the server sends back
// "Access-Control-Allow-Origin: *" all the time, but some of the
// client's requests are made without CORS and some with.
if (existingResource->resourceRequest().allowCookies() != request.allowCookies()) {
if (existingResource->resourceRequest().allowCookies() != request.allowCookies() || existingResource->options().credentials != cachedResourceRequest.options().credentials) {
LOG(ResourceLoading, "CachedResourceLoader::determineRevalidationPolicy reloading due to difference in credentials settings.");
logMemoryCacheResourceRequest(frame(), DiagnosticLoggingKeys::inMemoryCacheKey(), DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey());
return Reload;

0 comments on commit c934d7a

Please sign in to comment.