Generate headers before proxy changes host and port
This commit is contained in:
parent
6d5e40c324
commit
36aa87e031
1 changed files with 3 additions and 3 deletions
|
@ -247,10 +247,10 @@ local function adjustrequest(reqt)
|
|||
"invalid host '" .. base.tostring(nreqt.host) .. "'")
|
||||
-- compute uri if user hasn't overriden
|
||||
nreqt.uri = reqt.uri or adjusturi(nreqt)
|
||||
-- ajust host and port if there is a proxy
|
||||
nreqt.host, nreqt.port = adjustproxy(nreqt)
|
||||
-- adjust headers in request
|
||||
nreqt.headers = adjustheaders(nreqt)
|
||||
-- ajust host and port if there is a proxy
|
||||
nreqt.host, nreqt.port = adjustproxy(nreqt)
|
||||
return nreqt
|
||||
end
|
||||
|
||||
|
@ -353,4 +353,4 @@ _M.request = socket.protect(function(reqt, body)
|
|||
else return trequest(reqt) end
|
||||
end)
|
||||
|
||||
return _M
|
||||
return _M
|
||||
|
|
Loading…
Add table
Reference in a new issue