URLParser should reserialize IPv6 addresses that end with a colon
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jul 2019 19:12:42 +0000 (19:12 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Jul 2019 19:12:42 +0000 (19:12 +0000)
commitc358726eb98b5e2dd45ced6954d0bea82698ee2a
tree1522c48ec5d18b24704237219cfff292fe15c41e
parente3d21923e426edf2641e17b36ec84ff27e0e1796
URLParser should reserialize IPv6 addresses that end with a colon
https://bugs.webkit.org/show_bug.cgi?id=199627

Reviewed by Brady Eidson.

Source/WTF:

When an IPv6 address ends in a colon, the colon should be removed which means the
serialized output is different than the input, which the URLParser calls a syntax violation.
This matches the URL specification, and I added a unit test that used to assert.

* wtf/URLParser.cpp:
(WTF::URLParser::parseIPv6Host):

Tools:

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

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