Bug 150481

Summary: Navigations on the same host (but with different schemes and ports) should not trigger universal links
Product: WebKit Reporter: Sam Weinig <sam>
Component: WebKit APIAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mitz: review+

Description Sam Weinig 2015-10-22 16:53:15 PDT
Navigating from a page on http://foo.com to a page on https://foo.com should not trigger app links.
Comment 1 Sam Weinig 2015-10-22 16:55:04 PDT
<rdar://problem/22811325>
Comment 2 Sam Weinig 2015-10-22 17:05:38 PDT
Created attachment 263880 [details]
Patch
Comment 3 Sam Weinig 2015-10-22 17:10:01 PDT
Committed r191487: <http://trac.webkit.org/changeset/191487>
Comment 4 Darin Adler 2015-10-23 09:35:27 PDT
Comment on attachment 263880 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=263880&action=review

> Source/WebCore/platform/URL.cpp:1612
> +    for (int i = 0; i < hostLengthA; ++i) {
> +        if (a.string()[hostStartA + i] != b.string()[hostStartB + i])
> +            return false;
> +    }

No ASCII case folding?

Should consider using StringView::substring rather than writing out the loop. Might even want URL member functions that return StringView for pieces of the URL like the host in place inside the URL.