Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2b388e3d9c5a65bb3aa7a0df8ab84c501d1fe998
https://github.com/WebKit/WebKit/commit/2b388e3d9c5a65bb3aa7a0df8ab84c501d1fe998
Author: Charlie Wolfe <[email protected]>
Date: 2026-06-18 (Thu, 18 Jun 2026)
Changed paths:
M
LayoutTests/http/tests/app-privacy-report/app-attribution-speculative-revalidation-expected.txt
M
LayoutTests/http/tests/app-privacy-report/user-attribution-speculative-revalidation-expected.txt
M LayoutTests/http/tests/cache/disk-cache/disk-cache-range-expected.txt
M
LayoutTests/http/tests/cache/disk-cache/speculative-validation/http-auth-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/status.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/status.any.serviceworker-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/status.any.sharedworker-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/status.any.worker-expected.txt
M Source/WebCore/platform/network/CacheValidation.cpp
M Source/WebCore/platform/network/CacheValidation.h
M Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
M Source/WebKit/NetworkProcess/cache/NetworkCache.h
Log Message:
-----------
HTTP cache should store responses with explicit freshness regardless of
status code
https://bugs.webkit.org/show_bug.cgi?id=317258
rdar://179871690
Reviewed by Chris Dumez.
NetworkCache::makeStoreDecision() refused to store any response whose status
code was neither
cacheable-by-default nor in the isStatusCodePotentiallyCacheable() allowlist,
even when the response
carried explicit expiration headers.
RFC 9111 §3 allows caches to store responses with explicit freshness
information, and RFC 9110
§16.2.2 clarifies that this applies to any final status code.
https://www.rfc-editor.org/rfc/rfc9111.html#section-3
https://www.rfc-editor.org/rfc/rfc9110.html#section-16.2.2
* LayoutTests/http/tests/cache/disk-cache/disk-cache-range-expected.txt:
Rebaselined: a 416 (Range Not Satisfiable) response carrying Cache-Control:
max-age=100 now has
explicit freshness, so it is stored and served from the disk cache on the
second load instead of
going to the network.
*
LayoutTests/http/tests/app-privacy-report/app-attribution-speculative-revalidation-expected.txt:
*
LayoutTests/http/tests/app-privacy-report/user-attribution-speculative-revalidation-expected.txt:
*
LayoutTests/http/tests/cache/disk-cache/speculative-validation/http-auth-expected.txt:
Rebaselined: the authenticated resource's 401 response carries Cache-Control:
max-age=0, so it is
now stored in the disk cache. This removes one network-issued (and cancelled)
authentication
challenge from the speculative-revalidation path; the test's assertions are
otherwise unchanged.
*
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/status.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/status.any.serviceworker-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/status.any.sharedworker-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/status.any.worker-expected.txt:
* Source/WebCore/platform/network/CacheValidation.cpp:
(WebCore::isStatusCodePotentiallyCacheable): Deleted.
* Source/WebCore/platform/network/CacheValidation.h:
* Source/WebKit/NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeStoreDecision):
* Source/WebKit/NetworkProcess/cache/NetworkCache.h:
Canonical link: https://commits.webkit.org/315450@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications