This commit is contained in:
Peter Melnichenko 2017-02-08 10:33:21 +00:00 committed by GitHub
commit 971ac16156

View file

@ -193,7 +193,13 @@ function _M.build(parsed)
if string.find(authority, ":") then -- IPv6?
authority = "[" .. authority .. "]"
end
if parsed.port then authority = authority .. ":" .. parsed.port end
local port = parsed.port
if port then
if type(port) == "number" then
port = string.format("%d", port)
end
authority = authority .. ":" .. port
end
local userinfo = parsed.userinfo
if parsed.user then
userinfo = parsed.user