mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-27 04:48:21 +01:00
Merge 9c087f6b4e
into 1fad162690
This commit is contained in:
commit
08676679ad
@ -230,6 +230,10 @@ end
|
||||
local function adjustheaders(reqt)
|
||||
-- default headers
|
||||
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)
|
||||
if port ~= tostring(SCHEMES[reqt.scheme].port) then
|
||||
host = host .. ':' .. port end
|
||||
|
Loading…
Reference in New Issue
Block a user