mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-09-18 17:21:57 +02:00
Merge e8e2ff5915
into 1fad162690
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user