aboutsummaryrefslogtreecommitdiff
path: root/src/http.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/http.lua')
-rw-r--r--src/http.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http.lua b/src/http.lua
index 259eb2b..64bbd8e 100644
--- a/src/http.lua
+++ b/src/http.lua
@@ -229,7 +229,8 @@ end
229 229
230local function adjustheaders(reqt) 230local function adjustheaders(reqt)
231 -- default headers 231 -- default headers
232 local host = reqt.host 232 local hosttype, host = url.classify_host(reqt.host)
233 if hosttype == "ipv6" then host = "[" .. host .. "]" end
233 local port = tostring(reqt.port) 234 local port = tostring(reqt.port)
234 if port ~= tostring(SCHEMES[reqt.scheme].port) then 235 if port ~= tostring(SCHEMES[reqt.scheme].port) then
235 host = host .. ':' .. port end 236 host = host .. ':' .. port end