mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-04-20 15:36:45 +02:00
Merge 9c087f6b4e4eb5d2f445386128382b094a467408 into 1fad1626900a128be724cba9e9c19a6b2fe2bf6b
This commit is contained in:
commit
08676679ad
@ -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 string.find(host, "^[0-9a-fA-F:]+$") 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user