Fix Host: header according to RFC7230

This commit is contained in:
Diego Nehab 2014-07-15 14:49:20 -03:00
parent 6d5e40c324
commit d80bb0d82b

View File

@ -209,8 +209,7 @@ end
local function adjustheaders(reqt)
-- default headers
local host = reqt.host
if reqt.port then host = host .. ":" .. reqt.port end
local host = string.gsub(reqt.authority, "^.-@", "")
local lower = {
["user-agent"] = _M.USERAGENT,
["host"] = host,