diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-11-12 21:31:14 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-11-12 21:31:14 +0900 |
| commit | c0dda6a0f70116bf51e2ecdf4038beccad78a4b3 (patch) | |
| tree | 88f7a6756568fe2c3a74cf28111b13856af38d4e /src/DownloadEngine.cc | |
| parent | db5cc4db27c0495873c42dbac224ce599b970570 (diff) | |
Changed createSockPoolKey so that we can support IPv6 numeric address safely.
Diffstat (limited to 'src/DownloadEngine.cc')
| -rw-r--r-- | src/DownloadEngine.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/DownloadEngine.cc b/src/DownloadEngine.cc index 03250d6c..ba82fdee 100644 --- a/src/DownloadEngine.cc +++ b/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; } |
