This commit is contained in:
Petr-kk 2024-12-12 14:44:02 +00:00 committed by GitHub
commit 104b7b85c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -230,6 +230,10 @@ end
local function adjustheaders(reqt) local function adjustheaders(reqt)
-- default headers -- default headers
local host = reqt.host local host = reqt.host
--ipv6 host address must be in []
if host:find(":", 1, true) then
host = "["..host.."]"
end
local port = tostring(reqt.port) local port = tostring(reqt.port)
if port ~= tostring(SCHEMES[reqt.scheme].port) then if port ~= tostring(SCHEMES[reqt.scheme].port) then
host = host .. ':' .. port end host = host .. ':' .. port end