diff options
Diffstat (limited to 'src/url.c')
-rw-r--r-- | src/url.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -652,10 +652,10 @@ static bool_t Url_host_is_ip(const char *host) _MSG("an IPv4 address\n"); return TRUE; } - if (*host == '[' && + if (strchr(host, ':') && (len == strspn(host, "0123456789abcdefABCDEF:.[]"))) { /* The precise format is shown in section 3.2.2 of rfc 3986 */ - _MSG("an IPv6 address\n"); + MSG("an IPv6 address\n"); return TRUE; } return FALSE; |