Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 6871a1d27a55ef594e6c1d65d16330b2a26ca366 https://github.com/WebKit/WebKit/commit/6871a1d27a55ef594e6c1d65d16330b2a26ca366 Author: Matthew Finkel <m_fin...@apple.com> Date: 2024-09-13 (Fri, 13 Sep 2024)
Changed paths: M Source/WebCore/loader/cache/CachedResourceLoader.cpp M Source/WebKit/UIProcess/PageLoadState.cpp M Source/WebKit/UIProcess/PageLoadState.h M Source/WebKit/UIProcess/WebPageProxy.cpp M Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm Log Message: ----------- Track HTTPFallback state more thoroughly https://bugs.webkit.org/show_bug.cgi?id=279683 rdar://problem/135962595 Reviewed by Alex Christensen. Currently the HTTPFallback state is mostly maintained in the web process where we make decisions about upgrading the request. This works okay for simple failure conditions, but we need a way to remember the fallback state in the UIProcess when a site uses multiple redirects and navigations. We also need to ensure we don't upgrade same-site navigations. This patch resolves these issues by tracking the HTTPFallback state in the PageLoadState, and I use it to know whether we should show the HTTPS browsing warning. Without this information, we should repeatedly show the warning because we didn't remember that the user consented to loading the http URL. This change also uses the currently committed document's URL to decide if we are performing a same-site navigation. If that is the case and that document was loaded with HTTP, then we don't want to optimistically upgrade the request. * Source/WebCore/loader/cache/CachedResourceLoader.cpp: (WebCore::shouldPerformHTTPSUpgrade): (WebCore::CachedResourceLoader::requestResource): * Source/WebKit/UIProcess/PageLoadState.cpp: (WebKit::PageLoadState::setHTTPFallbackInProgress): (WebKit::PageLoadState::httpFallbackInProgress): * Source/WebKit/UIProcess/PageLoadState.h: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadRequestWithNavigationShared): (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared): * Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: (TEST(WKNavigation, HTTPSOnlyHTTPFallbackContinue)): (TEST(WKNavigation, HTTPSOnlyWithHTTPRedirect)): Canonical link: https://commits.webkit.org/283649@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes