include port in default Host header

See RFC 2616 section 14.23.
This commit is contained in:
Pierre Chapuis 2013-08-14 14:41:57 +02:00
parent 6bdb00e24c
commit 87d72dce4e

View File

@ -209,9 +209,11 @@ end
local function adjustheaders(reqt) local function adjustheaders(reqt)
-- default headers -- default headers
local host = reqt.host
if reqt.port then host = host .. ":" .. reqt.port end
local lower = { local lower = {
["user-agent"] = _M.USERAGENT, ["user-agent"] = _M.USERAGENT,
["host"] = reqt.host, ["host"] = host,
["connection"] = "close, TE", ["connection"] = "close, TE",
["te"] = "trailers" ["te"] = "trailers"
} }