update to state of the art

This commit is contained in:
s2
2020-10-10 15:18:01 +02:00
parent cf251a170f
commit 4cdcfd167c
1526 changed files with 48132 additions and 7268 deletions

View File

@@ -270,9 +270,9 @@ function _recomposeAuthority(components, options) {
//normalize IP hosts, add brackets and escape zone separator for IPv6
uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]"));
}
if (typeof components.port === "number") {
if (typeof components.port === "number" || typeof components.port === "string") {
uriTokens.push(":");
uriTokens.push(components.port.toString(10));
uriTokens.push(String(components.port));
}
return uriTokens.length ? uriTokens.join("") : undefined;
}