[Webkit-unassigned] [Bug 137302] New: location.href is not updated on a redirect with a custom protocol

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 1 07:06:58 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137302

           Summary: location.href is not updated on a redirect with a
                    custom protocol
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: iOS
               URL: http://m.wikipedia.org
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P2
         Component: WebKit API
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: danielo at opera.com
                CC: benjamin at webkit.org


If there's a custom NSURLProtocol, which is redirecting some page, the web view URL (as reported by javascript location.href) is not updated.
If page p1 redirects to p2, then the final location.href will be p1 (while expected is p2).
This happens only if the protocol is registered using [WKBrowsingContextController registerSchemeForCustomProtocol:], because otherwise the protocol code is bypassed.

Happens on iOS 8.1 [12B401].
I'm providing a test case code for the master branch at 809db5f8edac632ec3332b43dc90795d96914440.

Test case:
https://gist.github.com/anonymous/7fd3352c9f51eea9c4ce
Run it with ./TestWebKitAPI --gtest_filter=WebKit2CustomProtocolsTest.RedirectChangesURL

Manual test case on iOS:
1. go to http://m.wikipedia.org/
2. click a link
Expected results: link loads a page like http://en.m.wikipedia.org/wiki/Deaths_in_2014
Actual results: 404 error, because the link host is "m.wikipedia.org", and was not updated to en.m.wikipedia.org

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list