aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/http/server.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/http/server.lua b/net/http/server.lua
index df87283a..ab71dbc9 100644
--- a/net/http/server.lua
+++ b/net/http/server.lua
@@ -113,6 +113,7 @@ local function noop() end
function listener.onconnect(conn)
local session = { conn = conn };
local secure = conn:ssl() and true or nil;
+ local ip = conn:ip();
session.thread = async.runner(function (request)
local wait, done;
if request.partial == true then
@@ -127,6 +128,7 @@ function listener.onconnect(conn)
end, runner_callbacks, session);
local function success_cb(request)
--log("debug", "success_cb: %s", request.path);
+ request.ip = ip;
request.secure = secure;
session.thread:run(request);
end