URLParser: make parsing invalid IPv4 addresses more robust and correct
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2016 20:21:54 +0000 (20:21 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2016 20:21:54 +0000 (20:21 +0000)
commitbaf0a7552c7b5ac239de1ab7d95eee0898482ef7
treec2fc01cc75434f6c1c46fecf61313da43fc2e254
parentb3c76a157a2cb089ed99833aeb3ad9eb22847184
URLParser: make parsing invalid IPv4 addresses more robust and correct
https://bugs.webkit.org/show_bug.cgi?id=162746

Reviewed by Tim Horton.

Source/WebCore:

If parsing an IPv4 address fails, the characters are just treated as a regular domain.

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parseIPv4Number):
(WebCore::URLParser::parseIPv4Host):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/URLParser.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp