From e8e2ff5915d95cbb534f8ee1b0f3dca546db6204 Mon Sep 17 00:00:00 2001 From: Petr-kk Date: Thu, 12 Dec 2024 15:44:00 +0100 Subject: [PATCH] Update src/http.lua Co-authored-by: Thijs Schreijer --- src/http.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http.lua b/src/http.lua index 6d13783..107540f 100644 --- a/src/http.lua +++ b/src/http.lua @@ -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)