Permalink
Browse files

Changed createSockPoolKey so that we can support IPv6 numeric address…

… safely.
  • Loading branch information...
1 parent db5cc4d commit c0dda6a0f70116bf51e2ecdf4038beccad78a4b3 @tatsuhiro-t tatsuhiro-t committed Nov 12, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/DownloadEngine.cc
View
@@ -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;
}

0 comments on commit c0dda6a

Please sign in to comment.