Update src/http.lua

Co-authored-by: Thijs Schreijer <thijs@thijsschreijer.nl>
This commit is contained in:
Petr-kk 2024-12-12 15:44:00 +01:00 committed by GitHub
parent 9c087f6b4e
commit e8e2ff5915
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)