From 36aa87e03158451df8e51bf8dcd3942134e3d8d8 Mon Sep 17 00:00:00 2001 From: Charles Tabor Date: Fri, 21 Mar 2014 14:25:44 -0500 Subject: [PATCH] Generate headers before proxy changes host and port --- src/http.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/http.lua b/src/http.lua index 1d0eb50..204a841 100644 --- a/src/http.lua +++ b/src/http.lua @@ -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 \ No newline at end of file +return _M