aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-12-09 13:54:21 +0000
committerMatthew Wild <mwild1@gmail.com>2020-12-09 13:54:21 +0000
commit3de8b69f1cea1bbfdc29dceb4ca1991d583dcc74 (patch)
treedee745b16d8a8de84edebbe7ebad277653f89351
parent67a812d2f29009fe7df05fa278682b6116be5b33 (diff)
downloadprosody-3de8b69f1cea1bbfdc29dceb4ca1991d583dcc74.tar.gz
prosody-3de8b69f1cea1bbfdc29dceb4ca1991d583dcc74.zip
net.http: track time of request for debug/stats purposes
-rw-r--r--net/http.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/http.lua b/net/http.lua
index bb247d18..3481389a 100644
--- a/net/http.lua
+++ b/net/http.lua
@@ -24,6 +24,7 @@ local t_insert, t_concat = table.insert, table.concat;
local pairs = pairs;
local tonumber, tostring, traceback =
tonumber, tostring, debug.traceback;
+local os_time = os.time;
local xpcall = require "util.xpcall".xpcall;
local error = error
@@ -221,6 +222,7 @@ local function request(self, u, ex, callback)
req.url = u;
req.http = self;
+ req.time = os_time();
if not req.path then
req.path = "/";