Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cbed04cca06ff94b8b5fb316c54df7e143969ce0
      
https://github.com/WebKit/WebKit/commit/cbed04cca06ff94b8b5fb316c54df7e143969ce0
  Author: Matthew Finkel <[email protected]>
  Date:   2024-09-04 (Wed, 04 Sep 2024)

  Changed paths:
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm

  Log Message:
  -----------
  Perform HTTP fallback in UIProcess and after redirect
https://bugs.webkit.org/show_bug.cgi?id=279048
rdar://133794636

Reviewed by Alex Christensen.

HTTP fallback is currently handled in FrameLoader, but that causes problems
with PSON (and eventually will cause problems with site isolation). In
particular, there are currently bad interactions with cross-site redirects and
HTTP fallback. This change moves the controlling logic out of FrameLoader
into WebPageProxy::didiFailProvisionLoad where the load is re-initiated.

This change also allows falling back to HTTP after a redirect. Preventing
fallback after a redirect was overly restrictive and caused some site breakage.
Instead, we restrict this fallback to requests that were optimistically
upgraded.

Finally, WKNavigation.HTTPSFirstWithHTTPRedirect is adding coverage with
HTTPSFirst for how we behave when we fallback to HTTP after upgrading and
following multiple redirects. This is similar to an existing test we already
have for HTTPSOnly.

* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::handleLoadFailureRecovery): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(TEST(WKNavigation, HTTPSFirstHTTPDowngradeAfterPSON)):
(TEST(WKNavigation, HTTPSFirstWithHTTPRedirect)):

Canonical link: https://commits.webkit.org/283158@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to