[webkit-changes] [WebKit/WebKit] 678ece: Align https-by-default upgrade logic with mixed-co...
Commit Queue
noreply at github.com
Fri Jul 26 16:44:07 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 678ece22c6542a1ae99472c11d2204bd93be7ea1
https://github.com/WebKit/WebKit/commit/678ece22c6542a1ae99472c11d2204bd93be7ea1
Author: Matthew Finkel <m_finkel at apple.com>
Date: 2024-07-26 (Fri, 26 Jul 2024)
Changed paths:
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/loader/ResourceLoader.cpp
M Source/WebCore/loader/cache/CachedResourceLoader.cpp
M Source/WebCore/loader/cache/CachedResourceLoader.h
M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm
M Tools/WebKitTestRunner/TestController.cpp
Log Message:
-----------
Align https-by-default upgrade logic with mixed-content upgrading
https://bugs.webkit.org/show_bug.cgi?id=277053
rdar://132444853
Reviewed by Alex Christensen.
This patch performs https upgrade for an initial resource request, and on
redirect, similar to mixed content. This patch also leverages
ResourceRequest::wasSchemeOptimisticallyUpgraded() to make a decision about
whether we are in a redirect loop, instead of re-evaluating whether
https-by-default is enabled.
I also moved setting a shorter time-out for optimistically upgraded requests
into the NetworkResourceLoader. In the future I want to experiment with setting
a value that is more appropriate for the current network, and tracking those
measurements should happen in the network process.
Also I'm disabling the preference in WTR. Some tests are failing on some ports,
but not all. I want to keep this as testable.
No new tests, covered by existing tests, and:
1) move from [webView _mainFrameURL] to [webView URL]
2) Adjust one subtest to account for moving the upgrading behavior for
redirects into CachedResourceLoader::updateRequestAfterRedirection.
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::changeLocation):
* Source/WebCore/loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequestInternal):
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::shouldPerformHTTPSUpgrade):
(WebCore::CachedResourceLoader::updateRequestAfterRedirection):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::shouldUpgradeRequestforHTTPSOnly const): Deleted.
(WebCore::CachedResourceLoader::upgradeRequestforHTTPSOnlyIfNeeded const): Deleted.
* Source/WebCore/loader/cache/CachedResourceLoader.h:
* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(TEST(WKNavigation, HTTPSFirstHTTPDowngrade)):
(TEST(WKNavigation, HTTPSFirstHTTPDowngradeRedirect)):
(TEST(WKNavigation, HTTPSFirstLocalHostIPAddress)):
(TEST(WKNavigation, HTTPSOnlyInitialLoad)):
(TEST(WKNavigation, HTTPSOnlyHTTPFallback)):
(TEST(WKNavigation, HTTPSOnlyHTTPFallbackBypassEnabledCertificateError)):
(TEST(WKNavigation, HTTPSOnlyWithSameSiteBypass)):
(TEST(WKNavigation, HTTPSOnlyWithHTTPRedirect)):
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
Canonical link: https://commits.webkit.org/281429@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list