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

pull/4/head
Tatsuhiro Tsujikawa 2011-11-12 21:31:14 +09:00
parent db5cc4db27
commit c0dda6a0f7
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}