mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-09-19 09:32:10 +02:00
Update src/http.lua
Co-authored-by: Thijs Schreijer <thijs@thijsschreijer.nl>
This commit is contained in:
@@ -231,7 +231,7 @@ 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
|
||||
if host:find(":", 1, true) then
|
||||
host = "["..host.."]"
|
||||
end
|
||||
local port = tostring(reqt.port)
|
||||
|
Reference in New Issue
Block a user