Bug 246529 - didReceiveServerRedirectForProvisionalNavigation is not called for 307 redirects
Summary: didReceiveServerRedirectForProvisionalNavigation is not called for 307 redirects
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-14 11:55 PDT by Ali Juma
Modified: 2022-10-18 13:01 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Juma 2022-10-14 11:55:34 PDT
WKNavigationDelegate's didReceiveServerRedirectForProvisionalNavigation is not called on 307 redirects. For example, this can be tested on URLs that perform a 307 redirection from http to https, such has http://www.google.com or http://www.cbc.ca. 

The missing callback confuses Chrome for iOS's logic for working with navigation items, as we can't easily distinguish a redirect from two consecutive (but otherwise unrelated) navigations.
Comment 1 Alexey Proskuryakov 2022-10-16 18:47:34 PDT
Is this definitely a 307 at play, not Strict-Transport-Security? It's easier to see how the latter would be a special case.
Comment 2 Alexey Proskuryakov 2022-10-16 18:49:26 PDT
Also, http://www.cbc.ca redirects with 301 for me, and http://www.google.com doesn't at all (HTTP 200 without STS).
Comment 3 Ali Juma 2022-10-18 13:01:00 PDT
(In reply to Alexey Proskuryakov from comment #1)
> Is this definitely a 307 at play, not Strict-Transport-Security?

Ah, this turns out to be not 307 at all, but instead WKWebView's upgradeKnownHostsToHTTPS. For clarity, I'll close this bug and file a new one.