From 87d72dce4e76807b28b7c90e93d4b1645ea0af46 Mon Sep 17 00:00:00 2001 From: Pierre Chapuis Date: Wed, 14 Aug 2013 14:41:57 +0200 Subject: [PATCH] include port in default Host header See RFC 2616 section 14.23. --- src/http.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/http.lua b/src/http.lua index f83dcc5..1d0eb50 100644 --- a/src/http.lua +++ b/src/http.lua @@ -209,9 +209,11 @@ end local function adjustheaders(reqt) -- default headers + local host = reqt.host + if reqt.port then host = host .. ":" .. reqt.port end local lower = { ["user-agent"] = _M.USERAGENT, - ["host"] = reqt.host, + ["host"] = host, ["connection"] = "close, TE", ["te"] = "trailers" }