Bug 160824 - Make URLParser work with URLs missing URL parts
Summary: Make URLParser work with URLs missing URL parts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-12 14:49 PDT by Alex Christensen
Modified: 2016-08-12 16:36 PDT (History)
1 user (show)

See Also:


Attachments
Patch (17.39 KB, patch)
2016-08-12 14:50 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (10.42 KB, patch)
2016-08-12 16:10 PDT, Alex Christensen
beidson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2016-08-12 14:49:04 PDT
Make URLParser work with URLs missing URL parts
Comment 1 Alex Christensen 2016-08-12 14:50:42 PDT
Created attachment 285956 [details]
Patch
Comment 2 Alex Christensen 2016-08-12 15:51:03 PDT
Comment on attachment 285956 [details]
Patch

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

> Source/WebCore/platform/URLParser.cpp:116
> +                url.m_protocolIsInHTTPFamily = equalIgnoringASCIICase(urlScheme, "http") || equalIgnoringASCIICase(urlScheme, "https");

This can be a case-sensitive comparison because it is always lower case.
Comment 3 Brady Eidson 2016-08-12 16:04:35 PDT
Comment on attachment 285956 [details]
Patch

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

> Source/WebCore/platform/URLParser.cpp:65
> -    enum class State : uint8_t {
> +    enum State {

Leave enum class, please.

> Source/WebCore/platform/URLParser.cpp:68
>          SchemeEndCheckForSlashes, // Scheme state steps 2. 8.

Now's a good time to remove this comment.
Comment 4 Alex Christensen 2016-08-12 16:10:09 PDT
Created attachment 285970 [details]
Patch
Comment 5 Alex Christensen 2016-08-12 16:36:41 PDT
https://trac.webkit.org/changeset/204431