mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 20:38:22 +01:00
Merge pull request #74 from catwell/pull-hostport
Include port in default Host header
This commit is contained in:
commit
244e5d34a0
@ -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"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user