mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-25 12:08:21 +01:00
Generate headers before proxy changes host and port
This commit is contained in:
parent
6d5e40c324
commit
36aa87e031
@ -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…
Reference in New Issue
Block a user