[webkit-reviews] review granted: [Bug 182427] Add a way to check if a host is an IP address : [Attachment 332963] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 2 10:18:31 PST 2018


Alex Christensen <achristensen at apple.com> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 182427: Add a way to check if a host is an IP address
https://bugs.webkit.org/show_bug.cgi?id=182427

Attachment 332963: Patch

https://bugs.webkit.org/attachment.cgi?id=332963&action=review




--- Comment #10 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 332963
  --> https://bugs.webkit.org/attachment.cgi?id=332963
Patch

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

> Source/WebCore/platform/URL.cpp:1042
> +    // Assume that any host that ends with a digit is trying to be an IP
address.
> +    return !host.isEmpty() && isASCIIDigit(host[host.length() - 1]);

It's awful that this was ever used, but it's good that this is being used on
fewer platforms.


More information about the webkit-reviews mailing list