mirror of https://github.com/aria2/aria2
Changed createSockPoolKey so that we can support IPv6 numeric address safely.
parent
db5cc4db27
commit
c0dda6a0f7
|
@ -313,10 +313,9 @@ std::string createSockPoolKey
|
||||||
key += util::percentEncode(username);
|
key += util::percentEncode(username);
|
||||||
key += "@";
|
key += "@";
|
||||||
}
|
}
|
||||||
key += host;
|
key += fmt("%s(%u)", host.c_str(), port);
|
||||||
key += fmt(":%u", port);
|
|
||||||
if(!proxyhost.empty()) {
|
if(!proxyhost.empty()) {
|
||||||
key += fmt("/%s:%u", proxyhost.c_str(), proxyport);
|
key += fmt("/%s(%u)", proxyhost.c_str(), proxyport);
|
||||||
}
|
}
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue