Browse Source

Changed createSockPoolKey so that we can support IPv6 numeric address safely.

Tatsuhiro Tsujikawa 14 years ago
parent
commit
c0dda6a0f7
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/DownloadEngine.cc

+ 2 - 3
src/DownloadEngine.cc

@@ -313,10 +313,9 @@ std::string createSockPoolKey
     key += util::percentEncode(username);
     key += "@";
   }
-  key += host;
-  key += fmt(":%u", port);
+  key += fmt("%s(%u)", host.c_str(), port);
   if(!proxyhost.empty()) {
-    key += fmt("/%s:%u", proxyhost.c_str(), proxyport);
+    key += fmt("/%s(%u)", proxyhost.c_str(), proxyport);
   }
   return key;
 }