aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/url.c b/src/url.c
index 27c97d1c..7d3880ac 100644
--- a/src/url.c
+++ b/src/url.c
@@ -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;