From: Amos Jeffries Date: Thu, 10 Apr 2008 11:29:39 +0000 (+1200) Subject: Bug 2302: IPv6 IPs of the CONNECT header URLs parse wrong X-Git-Tag: SQUID_3_1_0_1~49^2~304 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f0affc744eccaab374b252f3b138fe1eb883485;p=thirdparty%2Fsquid.git Bug 2302: IPv6 IPs of the CONNECT header URLs parse wrong --- diff --git a/src/url.cc b/src/url.cc index a56e31abcf..869ec4559b 100644 --- a/src/url.cc +++ b/src/url.cc @@ -221,7 +221,7 @@ urlParse(const HttpRequestMethod& method, char *url, HttpRequest *request) if (method == METHOD_CONNECT) { port = CONNECT_PORT; - if (sscanf(url, "[%[^:]]:%d", host, &port) < 1) + if (sscanf(url, "[%[^]]]:%d", host, &port) < 1) if (sscanf(url, "%[^:]:%d", host, &port) < 1) return NULL;