<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[212279] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/212279">212279</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2017-02-13 23:43:28 -0800 (Mon, 13 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>URLs with an invalid IPv4 address should be invalid
https://bugs.webkit.org/show_bug.cgi?id=168260

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

All URL hosts are fed through the IPv4 parser.  https://webkit.org/ doesn't
look enough like an IPv4 address to be considered an invalid IPv4 address, so 
we continue to the String host processing.  http://127.0.0.257 does, though, and
according to https://url.spec.whatwg.org/#concept-ipv4-parser parsing that URL
should fail.

Covered by newly passing web platform tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parseIPv4Host):
(WebCore::URLParser::parseHostAndPort):
* platform/URLParser.h:

Source/WTF:

* wtf/Expected.h:
(WTF::Expected::value):
Added missing WTFMove for rvalue Expected::value().

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):
Update tests to reflect new correct behavior.

LayoutTests:

* fetch/fetch-url-serialization-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfetchfetchurlserializationexpectedtxt">trunk/LayoutTests/fetch/fetch-url-serialization-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlaelementexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlaelementxhtmlexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsurlurlconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfExpectedh">trunk/Source/WTF/wtf/Expected.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformURLParsercpp">trunk/Source/WebCore/platform/URLParser.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformURLParserh">trunk/Source/WebCore/platform/URLParser.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebCoreURLParsercpp">trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/LayoutTests/ChangeLog        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2017-02-13  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        URLs with an invalid IPv4 address should be invalid
+        https://bugs.webkit.org/show_bug.cgi?id=168260
+
+        Reviewed by Tim Horton.
+
+        * fetch/fetch-url-serialization-expected.txt:
+
</ins><span class="cx"> 2017-02-13  Karim H  &lt;karim@karhm.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Added the BSTR roles tag test for Windows.
</span></span></pre></div>
<a id="trunkLayoutTestsfetchfetchurlserializationexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fetch/fetch-url-serialization-expected.txt (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fetch/fetch-url-serialization-expected.txt        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/LayoutTests/fetch/fetch-url-serialization-expected.txt        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx"> PASS Testing Request url 'http://hello%00' with base 'http://other.com/' 
</span><span class="cx"> PASS Testing Request url 'http://%30%78%63%30%2e%30%32%35%30.01' with base 'http://other.com/' 
</span><span class="cx"> PASS Testing Request url 'http://%30%78%63%30%2e%30%32%35%30.01%2e' with base 'http://other.com/' 
</span><del>-FAIL Testing Request url 'http://192.168.0.257' with base 'http://other.com/' assert_throws: function &quot;function () {  new Request(url.input); }&quot; did not throw
</del><ins>+PASS Testing Request url 'http://192.168.0.257' with base 'http://other.com/' 
</ins><span class="cx"> PASS Testing Request url 'http://%3g%78%63%30%2e%30%32%35%30%2E.01' with base 'http://other.com/' 
</span><span class="cx"> PASS Testing Request url 'http://192.168.0.1 hello' with base 'http://other.com/' 
</span><span class="cx"> PASS Testing Request url 'http://0Xc0.0250.01' with base 'http://other.com/' 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2017-02-13  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        URLs with an invalid IPv4 address should be invalid
+        https://bugs.webkit.org/show_bug.cgi?id=168260
+
+        Reviewed by Tim Horton.
+
+        * web-platform-tests/url/a-element-expected.txt:
+        * web-platform-tests/url/a-element-xhtml-expected.txt:
+        * web-platform-tests/url/url-constructor-expected.txt:
+
+2017-02-13  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
</ins><span class="cx">         Percent should be allowed in non-special URL hosts
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=168255
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlaelementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -278,7 +278,7 @@
</span><span class="cx"> PASS Parsing: &lt;http://hello%00&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01%2e&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://192.168.0.257&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
</del><ins>+PASS Parsing: &lt;http://192.168.0.257&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://%3g%78%63%30%2e%30%32%35%30%2E.01&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://192.168.0.1 hello&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://0Xc0.0250.01&gt; against &lt;http://other.com/&gt; 
</span><span class="lines">@@ -372,13 +372,13 @@
</span><span class="cx"> PASS Parsing: &lt;http://256.com&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://999999999&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://999999999.com&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://10000000000&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
</del><ins>+PASS Parsing: &lt;http://10000000000&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://10000000000.com&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://4294967295&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://4294967296&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
</del><ins>+PASS Parsing: &lt;http://4294967296&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://0xffffffff&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://0xffffffff1&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
-FAIL Parsing: &lt;http://256.256.256.256&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
</del><ins>+PASS Parsing: &lt;http://0xffffffff1&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://256.256.256.256&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://256.256.256.256.256&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;file:///C%3A/&gt; against &lt;about:blank&gt; 
</span><span class="cx"> PASS Parsing: &lt;file:///C%7C/&gt; against &lt;about:blank&gt; 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlaelementxhtmlexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -278,7 +278,7 @@
</span><span class="cx"> PASS Parsing: &lt;http://hello%00&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01%2e&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://192.168.0.257&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
</del><ins>+PASS Parsing: &lt;http://192.168.0.257&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://%3g%78%63%30%2e%30%32%35%30%2E.01&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://192.168.0.1 hello&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://0Xc0.0250.01&gt; against &lt;http://other.com/&gt; 
</span><span class="lines">@@ -372,13 +372,13 @@
</span><span class="cx"> PASS Parsing: &lt;http://256.com&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://999999999&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://999999999.com&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://10000000000&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
</del><ins>+PASS Parsing: &lt;http://10000000000&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://10000000000.com&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://4294967295&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://4294967296&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
</del><ins>+PASS Parsing: &lt;http://4294967296&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://0xffffffff&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://0xffffffff1&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
-FAIL Parsing: &lt;http://256.256.256.256&gt; against &lt;http://other.com/&gt; assert_unreached: Expected URL to fail parsing Reached unreachable code
</del><ins>+PASS Parsing: &lt;http://0xffffffff1&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://256.256.256.256&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://256.256.256.256.256&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;file:///C%3A/&gt; against &lt;about:blank&gt; 
</span><span class="cx"> PASS Parsing: &lt;file:///C%7C/&gt; against &lt;about:blank&gt; 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsurlurlconstructorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -284,9 +284,7 @@
</span><span class="cx"> PASS Parsing: &lt;http://hello%00&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://%30%78%63%30%2e%30%32%35%30.01%2e&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://192.168.0.257&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
-          bURL(expected.input, expected.base)
-        }&quot; did not throw
</del><ins>+PASS Parsing: &lt;http://192.168.0.257&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://%3g%78%63%30%2e%30%32%35%30%2E.01&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://192.168.0.1 hello&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://0Xc0.0250.01&gt; against &lt;http://other.com/&gt; 
</span><span class="lines">@@ -382,21 +380,13 @@
</span><span class="cx"> PASS Parsing: &lt;http://256.com&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://999999999&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://999999999.com&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://10000000000&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
-          bURL(expected.input, expected.base)
-        }&quot; did not throw
</del><ins>+PASS Parsing: &lt;http://10000000000&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://10000000000.com&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;http://4294967295&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://4294967296&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
-          bURL(expected.input, expected.base)
-        }&quot; did not throw
</del><ins>+PASS Parsing: &lt;http://4294967296&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://0xffffffff&gt; against &lt;http://other.com/&gt; 
</span><del>-FAIL Parsing: &lt;http://0xffffffff1&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
-          bURL(expected.input, expected.base)
-        }&quot; did not throw
-FAIL Parsing: &lt;http://256.256.256.256&gt; against &lt;http://other.com/&gt; assert_throws: function &quot;function () {
-          bURL(expected.input, expected.base)
-        }&quot; did not throw
</del><ins>+PASS Parsing: &lt;http://0xffffffff1&gt; against &lt;http://other.com/&gt; 
+PASS Parsing: &lt;http://256.256.256.256&gt; against &lt;http://other.com/&gt; 
</ins><span class="cx"> PASS Parsing: &lt;http://256.256.256.256.256&gt; against &lt;http://other.com/&gt; 
</span><span class="cx"> PASS Parsing: &lt;file:///C%3A/&gt; against &lt;about:blank&gt; 
</span><span class="cx"> PASS Parsing: &lt;file:///C%7C/&gt; against &lt;about:blank&gt; 
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/Source/WTF/ChangeLog        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2017-02-13  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        URLs with an invalid IPv4 address should be invalid
+        https://bugs.webkit.org/show_bug.cgi?id=168260
+
+        Reviewed by Tim Horton.
+
+        * wtf/Expected.h:
+        (WTF::Expected::value):
+        Added missing WTFMove for rvalue Expected::value().
+
</ins><span class="cx"> 2017-02-13  Said Abou-Hallawa  &lt;sabouhallawa@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         The current frame of an image should not deleted if another frame is asynchronously being decoded
</span></span></pre></div>
<a id="trunkSourceWTFwtfExpectedh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Expected.h (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Expected.h        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/Source/WTF/wtf/Expected.h        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -315,7 +315,7 @@
</span><span class="cx">     constexpr const ValueType&amp; value() const &amp; { return base::has ? base::s.val : (ExpectedDetail::Throw(), base::s.val); }
</span><span class="cx">     RELAXED_CONSTEXPR ValueType&amp; value() &amp; { return base::has ? base::s.val : (ExpectedDetail::Throw(), base::s.val); }
</span><span class="cx">     constexpr const ValueType&amp;&amp; value() const &amp;&amp; { return base::has ? base::s.val : (ExpectedDetail::Throw(), base::s.val); }
</span><del>-    RELAXED_CONSTEXPR ValueType&amp;&amp; value() &amp;&amp; { return base::has ? base::s.val : (ExpectedDetail::Throw(), base::s.val); }
</del><ins>+    RELAXED_CONSTEXPR ValueType&amp;&amp; value() &amp;&amp; { return WTFMove(base::has ? base::s.val : (ExpectedDetail::Throw(), base::s.val)); }
</ins><span class="cx">     constexpr const ErrorType&amp; error() const &amp; { return !base::has ? base::s.err : (ExpectedDetail::Throw(), base::s.err); }
</span><span class="cx">     ErrorType&amp; error() &amp; { return !base::has ? base::s.err : (ExpectedDetail::Throw(), base::s.err); }
</span><span class="cx">     RELAXED_CONSTEXPR ErrorType&amp;&amp; error() &amp;&amp; { return !base::has ? base::s.err : (ExpectedDetail::Throw(), base::s.err); }
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/Source/WebCore/ChangeLog        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2017-02-13  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        URLs with an invalid IPv4 address should be invalid
+        https://bugs.webkit.org/show_bug.cgi?id=168260
+
+        Reviewed by Tim Horton.
+
+        All URL hosts are fed through the IPv4 parser.  https://webkit.org/ doesn't
+        look enough like an IPv4 address to be considered an invalid IPv4 address, so 
+        we continue to the String host processing.  http://127.0.0.257 does, though, and
+        according to https://url.spec.whatwg.org/#concept-ipv4-parser parsing that URL
+        should fail.
+
+        Covered by newly passing web platform tests.
+
+        * platform/URLParser.cpp:
+        (WebCore::URLParser::parseIPv4Host):
+        (WebCore::URLParser::parseHostAndPort):
+        * platform/URLParser.h:
+
</ins><span class="cx"> 2017-02-13  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reverted r212275. It still breaks some Apple-internal builds.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformURLParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/URLParser.cpp (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/URLParser.cpp        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/Source/WebCore/platform/URLParser.cpp        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -2130,8 +2130,13 @@
</span><span class="cx">     appendToASCIIBuffer(']');
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+enum class URLParser::IPv4PieceParsingError {
+    Failure,
+    Overflow,
+};
+
</ins><span class="cx"> template&lt;typename CharacterType&gt;
</span><del>-std::optional&lt;uint32_t&gt; URLParser::parseIPv4Piece(CodePointIterator&lt;CharacterType&gt;&amp; iterator, bool&amp; didSeeSyntaxViolation)
</del><ins>+Expected&lt;uint32_t, URLParser::IPv4PieceParsingError&gt; URLParser::parseIPv4Piece(CodePointIterator&lt;CharacterType&gt;&amp; iterator, bool&amp; didSeeSyntaxViolation)
</ins><span class="cx"> {
</span><span class="cx">     enum class State : uint8_t {
</span><span class="cx">         UnknownBase,
</span><span class="lines">@@ -2143,7 +2148,7 @@
</span><span class="cx">     State state = State::UnknownBase;
</span><span class="cx">     Checked&lt;uint32_t, RecordOverflow&gt; value = 0;
</span><span class="cx">     if (!iterator.atEnd() &amp;&amp; *iterator == '.')
</span><del>-        return std::nullopt;
</del><ins>+        return makeUnexpected(IPv4PieceParsingError::Failure);
</ins><span class="cx">     while (!iterator.atEnd()) {
</span><span class="cx">         if (isTabOrNewline(*iterator)) {
</span><span class="cx">             didSeeSyntaxViolation = true;
</span><span class="lines">@@ -2174,31 +2179,31 @@
</span><span class="cx">             break;
</span><span class="cx">         case State::Decimal:
</span><span class="cx">             if (!isASCIIDigit(*iterator))
</span><del>-                return std::nullopt;
</del><ins>+                return makeUnexpected(IPv4PieceParsingError::Failure);
</ins><span class="cx">             value *= 10;
</span><span class="cx">             value += *iterator - '0';
</span><span class="cx">             if (UNLIKELY(value.hasOverflowed()))
</span><del>-                return std::nullopt;
</del><ins>+                return makeUnexpected(IPv4PieceParsingError::Overflow);
</ins><span class="cx">             ++iterator;
</span><span class="cx">             break;
</span><span class="cx">         case State::Octal:
</span><span class="cx">             ASSERT(didSeeSyntaxViolation);
</span><span class="cx">             if (*iterator &lt; '0' || *iterator &gt; '7')
</span><del>-                return std::nullopt;
</del><ins>+                return makeUnexpected(IPv4PieceParsingError::Failure);
</ins><span class="cx">             value *= 8;
</span><span class="cx">             value += *iterator - '0';
</span><span class="cx">             if (UNLIKELY(value.hasOverflowed()))
</span><del>-                return std::nullopt;
</del><ins>+                return makeUnexpected(IPv4PieceParsingError::Overflow);
</ins><span class="cx">             ++iterator;
</span><span class="cx">             break;
</span><span class="cx">         case State::Hex:
</span><span class="cx">             ASSERT(didSeeSyntaxViolation);
</span><span class="cx">             if (!isASCIIHexDigit(*iterator))
</span><del>-                return std::nullopt;
</del><ins>+                return makeUnexpected(IPv4PieceParsingError::Failure);
</ins><span class="cx">             value *= 16;
</span><span class="cx">             value += toASCIIHexValue(*iterator);
</span><span class="cx">             if (UNLIKELY(value.hasOverflowed()))
</span><del>-                return std::nullopt;
</del><ins>+                return makeUnexpected(IPv4PieceParsingError::Overflow);
</ins><span class="cx">             ++iterator;
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="lines">@@ -2214,12 +2219,18 @@
</span><span class="cx">     return values[exponent];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+enum class URLParser::IPv4ParsingError {
+    Failure,
+    NotIPv4,
+};
+
</ins><span class="cx"> template&lt;typename CharacterTypeForSyntaxViolation, typename CharacterType&gt;
</span><del>-std::optional&lt;URLParser::IPv4Address&gt; URLParser::parseIPv4Host(const CodePointIterator&lt;CharacterTypeForSyntaxViolation&gt;&amp; iteratorForSyntaxViolationPosition, CodePointIterator&lt;CharacterType&gt; iterator)
</del><ins>+Expected&lt;URLParser::IPv4Address, URLParser::IPv4ParsingError&gt; URLParser::parseIPv4Host(const CodePointIterator&lt;CharacterTypeForSyntaxViolation&gt;&amp; iteratorForSyntaxViolationPosition, CodePointIterator&lt;CharacterType&gt; iterator)
</ins><span class="cx"> {
</span><del>-    Vector&lt;uint32_t, 4&gt; items;
-    items.reserveInitialCapacity(4);
</del><ins>+    Vector&lt;Expected&lt;uint32_t, URLParser::IPv4PieceParsingError&gt;, 4&gt; items;
</ins><span class="cx">     bool didSeeSyntaxViolation = false;
</span><ins>+    if (!iterator.atEnd() &amp;&amp; *iterator == '.')
+        return makeUnexpected(IPv4ParsingError::NotIPv4);
</ins><span class="cx">     while (!iterator.atEnd()) {
</span><span class="cx">         if (isTabOrNewline(*iterator)) {
</span><span class="cx">             didSeeSyntaxViolation = true;
</span><span class="lines">@@ -2227,35 +2238,39 @@
</span><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx">         if (items.size() &gt;= 4)
</span><del>-            return std::nullopt;
-        if (auto item = parseIPv4Piece(iterator, didSeeSyntaxViolation))
-            items.append(item.value());
-        else
-            return std::nullopt;
-        if (!iterator.atEnd()) {
-            if (items.size() &gt;= 4)
-                return std::nullopt;
-            if (*iterator == '.')
-                ++iterator;
-            else
-                return std::nullopt;
</del><ins>+            return makeUnexpected(IPv4ParsingError::NotIPv4);
+        items.append(parseIPv4Piece(iterator, didSeeSyntaxViolation));
+        if (!iterator.atEnd() &amp;&amp; *iterator == '.') {
+            ++iterator;
+            if (iterator.atEnd())
+                syntaxViolation(iteratorForSyntaxViolationPosition);
+            else if (*iterator == '.')
+                return makeUnexpected(IPv4ParsingError::NotIPv4);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     if (!iterator.atEnd() || !items.size() || items.size() &gt; 4)
</span><del>-        return std::nullopt;
</del><ins>+        return makeUnexpected(IPv4ParsingError::NotIPv4);
+    for (const auto&amp; item : items) {
+        if (!item.hasValue() &amp;&amp; item.error() == IPv4PieceParsingError::Failure)
+            return makeUnexpected(IPv4ParsingError::NotIPv4);
+    }
+    for (const auto&amp; item : items) {
+        if (!item.hasValue() &amp;&amp; item.error() == IPv4PieceParsingError::Overflow)
+            return makeUnexpected(IPv4ParsingError::Failure);
+    }
</ins><span class="cx">     if (items.size() &gt; 1) {
</span><span class="cx">         for (size_t i = 0; i &lt; items.size() - 1; i++) {
</span><del>-            if (items[i] &gt; 255)
-                return std::nullopt;
</del><ins>+            if (items[i].value() &gt; 255)
+                return makeUnexpected(IPv4ParsingError::Failure);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><del>-    if (items[items.size() - 1] &gt;= pow256(5 - items.size()))
-        return std::nullopt;
</del><ins>+    if (items[items.size() - 1].value() &gt;= pow256(5 - items.size()))
+        return makeUnexpected(IPv4ParsingError::Failure);
</ins><span class="cx"> 
</span><span class="cx">     if (didSeeSyntaxViolation)
</span><span class="cx">         syntaxViolation(iteratorForSyntaxViolationPosition);
</span><del>-    for (auto item : items) {
-        if (item &gt; 255)
</del><ins>+    for (const auto&amp; item : items) {
+        if (item.value() &gt; 255)
</ins><span class="cx">             syntaxViolation(iteratorForSyntaxViolationPosition);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2262,9 +2277,9 @@
</span><span class="cx">     if (UNLIKELY(items.size() != 4))
</span><span class="cx">         syntaxViolation(iteratorForSyntaxViolationPosition);
</span><span class="cx"> 
</span><del>-    IPv4Address ipv4 = items.takeLast();
</del><ins>+    IPv4Address ipv4 = items.takeLast().value();
</ins><span class="cx">     for (size_t counter = 0; counter &lt; items.size(); ++counter)
</span><del>-        ipv4 += items[counter] * pow256(3 - counter);
</del><ins>+        ipv4 += items[counter].value() * pow256(3 - counter);
</ins><span class="cx">     return ipv4;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2634,7 +2649,8 @@
</span><span class="cx">             if (isForbiddenHostCodePoint(*iterator))
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><del>-        if (auto address = parseIPv4Host(hostIterator, CodePointIterator&lt;CharacterType&gt;(hostIterator, iterator))) {
</del><ins>+        auto address = parseIPv4Host(hostIterator, CodePointIterator&lt;CharacterType&gt;(hostIterator, iterator));
+        if (address) {
</ins><span class="cx">             serializeIPv4(address.value());
</span><span class="cx">             m_url.m_hostEnd = currentPosition(iterator);
</span><span class="cx">             if (iterator.atEnd()) {
</span><span class="lines">@@ -2643,6 +2659,8 @@
</span><span class="cx">             }
</span><span class="cx">             return parsePort(iterator);
</span><span class="cx">         }
</span><ins>+        if (address.error() == IPv4ParsingError::Failure)
+            return false;
</ins><span class="cx">         for (; hostIterator != iterator; ++hostIterator) {
</span><span class="cx">             if (UNLIKELY(isTabOrNewline(*hostIterator))) {
</span><span class="cx">                 syntaxViolation(hostIterator);
</span><span class="lines">@@ -2692,7 +2710,8 @@
</span><span class="cx">     Vector&lt;LChar, defaultInlineBufferSize&gt;&amp; asciiDomainValue = asciiDomain.value();
</span><span class="cx">     const LChar* asciiDomainCharacters = asciiDomainValue.data();
</span><span class="cx"> 
</span><del>-    if (auto address = parseIPv4Host(hostBegin, CodePointIterator&lt;LChar&gt;(asciiDomainValue.begin(), asciiDomainValue.end()))) {
</del><ins>+    auto address = parseIPv4Host(hostBegin, CodePointIterator&lt;LChar&gt;(asciiDomainValue.begin(), asciiDomainValue.end()));
+    if (address) {
</ins><span class="cx">         serializeIPv4(address.value());
</span><span class="cx">         m_url.m_hostEnd = currentPosition(iterator);
</span><span class="cx">         if (iterator.atEnd()) {
</span><span class="lines">@@ -2701,6 +2720,8 @@
</span><span class="cx">         }
</span><span class="cx">         return parsePort(iterator);
</span><span class="cx">     }
</span><ins>+    if (address.error() == IPv4ParsingError::Failure)
+        return false;
</ins><span class="cx"> 
</span><span class="cx">     appendToASCIIBuffer(asciiDomainCharacters, asciiDomainValue.size());
</span><span class="cx">     m_url.m_hostEnd = currentPosition(iterator);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformURLParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/URLParser.h (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/URLParser.h        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/Source/WebCore/platform/URLParser.h        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;TextEncoding.h&quot;
</span><span class="cx"> #include &quot;URL.h&quot;
</span><ins>+#include &lt;wtf/Expected.h&gt;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> 
</span><span class="cx"> struct UIDNA;
</span><span class="lines">@@ -110,8 +111,10 @@
</span><span class="cx"> 
</span><span class="cx">     using IPv4Address = uint32_t;
</span><span class="cx">     void serializeIPv4(IPv4Address);
</span><del>-    template&lt;typename CharacterTypeForSyntaxViolation, typename CharacterType&gt; std::optional&lt;IPv4Address&gt; parseIPv4Host(const CodePointIterator&lt;CharacterTypeForSyntaxViolation&gt;&amp;, CodePointIterator&lt;CharacterType&gt;);
-    template&lt;typename CharacterType&gt; std::optional&lt;uint32_t&gt; parseIPv4Piece(CodePointIterator&lt;CharacterType&gt;&amp;, bool&amp; syntaxViolation);
</del><ins>+    enum class IPv4ParsingError;
+    enum class IPv4PieceParsingError;
+    template&lt;typename CharacterTypeForSyntaxViolation, typename CharacterType&gt; Expected&lt;IPv4Address, IPv4ParsingError&gt; parseIPv4Host(const CodePointIterator&lt;CharacterTypeForSyntaxViolation&gt;&amp;, CodePointIterator&lt;CharacterType&gt;);
+    template&lt;typename CharacterType&gt; Expected&lt;uint32_t, URLParser::IPv4PieceParsingError&gt; parseIPv4Piece(CodePointIterator&lt;CharacterType&gt;&amp;, bool&amp; syntaxViolation);
</ins><span class="cx">     using IPv6Address = std::array&lt;uint16_t, 8&gt;;
</span><span class="cx">     template&lt;typename CharacterType&gt; std::optional&lt;IPv6Address&gt; parseIPv6Host(CodePointIterator&lt;CharacterType&gt;);
</span><span class="cx">     template&lt;typename CharacterType&gt; std::optional&lt;uint32_t&gt; parseIPv4PieceInsideIPv6(CodePointIterator&lt;CharacterType&gt;&amp;);
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/Tools/ChangeLog        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2017-02-13  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        URLs with an invalid IPv4 address should be invalid
+        https://bugs.webkit.org/show_bug.cgi?id=168260
+
+        Reviewed by Tim Horton.
+
+        * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
+        (TestWebKitAPI::TEST_F):
+        Update tests to reflect new correct behavior.
+
</ins><span class="cx"> 2017-02-13  Don Olmstead  &lt;don.olmstead@am.sony.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WinCairo] Add Build Slave
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebCoreURLParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (212278 => 212279)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp        2017-02-14 07:16:57 UTC (rev 212278)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp        2017-02-14 07:43:28 UTC (rev 212279)
</span><span class="lines">@@ -493,11 +493,22 @@
</span><span class="cx">     checkURL(&quot;http://\t//\\///user:@webkit.org:99?foo&quot;, {&quot;http&quot;, &quot;user&quot;, &quot;&quot;, &quot;webkit.org&quot;, 99, &quot;/&quot;, &quot;foo&quot;, &quot;&quot;, &quot;http://user@webkit.org:99/?foo&quot;});
</span><span class="cx">     checkURL(&quot;http:/\\user:@webkit.org:99?foo&quot;, {&quot;http&quot;, &quot;user&quot;, &quot;&quot;, &quot;webkit.org&quot;, 99, &quot;/&quot;, &quot;foo&quot;, &quot;&quot;, &quot;http://user@webkit.org:99/?foo&quot;});
</span><span class="cx">     checkURL(&quot;http://127.0.0.1&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;127.0.0.1&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://127.0.0.1/&quot;});
</span><del>-    checkURL(&quot;http://127.0.0.1.&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;127.0.0.1.&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://127.0.0.1./&quot;});
-    checkURL(&quot;http://127.0.0.1./&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;127.0.0.1.&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://127.0.0.1./&quot;});
-    checkURL(&quot;http://0x100.0/&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;0x100.0&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://0x100.0/&quot;});
-    checkURL(&quot;http://0.0.0x100.0/&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;0.0.0x100.0&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://0.0.0x100.0/&quot;});
-    checkURL(&quot;http://0.0.0.0x100/&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;0.0.0.0x100&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://0.0.0.0x100/&quot;});
</del><ins>+    checkURLDifferences(&quot;http://127.0.0.1.&quot;,
+        {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;127.0.0.1&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://127.0.0.1/&quot;},
+        {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;127.0.0.1.&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://127.0.0.1./&quot;});
+    checkURLDifferences(&quot;http://127.0.0.1./&quot;,
+        {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;127.0.0.1&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://127.0.0.1/&quot;},
+        {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;127.0.0.1.&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://127.0.0.1./&quot;});
+    checkURL(&quot;http://127.0.0.1../&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;127.0.0.1..&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://127.0.0.1../&quot;});
+    checkURLDifferences(&quot;http://0x100.0/&quot;,
+        {&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, 0, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;http://0x100.0/&quot;},
+        {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;0x100.0&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://0x100.0/&quot;});
+    checkURLDifferences(&quot;http://0.0.0x100.0/&quot;,
+        {&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, 0, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;http://0.0.0x100.0/&quot;},
+        {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;0.0.0x100.0&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://0.0.0x100.0/&quot;});
+    checkURLDifferences(&quot;http://0.0.0.0x100/&quot;,
+        {&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, 0, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;http://0.0.0.0x100/&quot;},
+        {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;0.0.0.0x100&quot;, 0, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://0.0.0.0x100/&quot;});
</ins><span class="cx">     checkURL(&quot;http://host:123?&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;host&quot;, 123, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://host:123/?&quot;});
</span><span class="cx">     checkURL(&quot;http://host:123?query&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;host&quot;, 123, &quot;/&quot;, &quot;query&quot;, &quot;&quot;, &quot;http://host:123/?query&quot;});
</span><span class="cx">     checkURL(&quot;http://host:123#&quot;, {&quot;http&quot;, &quot;&quot;, &quot;&quot;, &quot;host&quot;, 123, &quot;/&quot;, &quot;&quot;, &quot;&quot;, &quot;http://host:123/#&quot;});
</span></span></pre>
</div>
</div>

</body>
</html>