[webkit-reviews] review granted: [Bug 214218] Improve IPv6 detection when setting host/hostname : [Attachment 404054] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jul 11 12:09:53 PDT 2020
Darin Adler <darin at apple.com> has granted Rob Buis <rbuis at igalia.com>'s request
for review:
Bug 214218: Improve IPv6 detection when setting host/hostname
https://bugs.webkit.org/show_bug.cgi?id=214218
Attachment 404054: Patch
https://bugs.webkit.org/attachment.cgi?id=404054&action=review
--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 404054
--> https://bugs.webkit.org/attachment.cgi?id=404054
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=404054&action=review
Looks good, but I am not sure it’s perfect.
> Source/WTF/wtf/URL.cpp:464
> + if (hostName.find(':') != notFound && !hostName.startsWith('['))
find != notFound is the same thing as contains; contains is preferred.
Unless you meant to say != colonIndex here? If you did, then do we have enough
test coverage, because somehow we missed that error?
> Source/WebCore/html/URLDecomposition.cpp:110
> + size_t ipv6separator = value.reverseFind(']');
ipv6separator should not be all lowercase. I think the "s" should be
capitalized.
More information about the webkit-reviews
mailing list