]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2302: IPv6 IPs of the CONNECT header URLs parse wrong
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 10 Apr 2008 11:29:39 +0000 (23:29 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 10 Apr 2008 11:29:39 +0000 (23:29 +1200)
src/url.cc

index a56e31abcfb62b23302eed91df0086667556b2e5..869ec4559b234b515a3e805b26e79c61ba3dea65 100644 (file)
@@ -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;