Bug 150481 - Navigations on the same host (but with different schemes and ports) should not trigger universal links
Summary: Navigations on the same host (but with different schemes and ports) should no...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-10-22 16:53 PDT by Sam Weinig
Modified: 2015-10-23 09:35 PDT (History)
0 users

See Also:


Attachments
Patch (16.65 KB, patch)
2015-10-22 17:05 PDT, Sam Weinig
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.