diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-12-09 13:54:21 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-12-09 13:54:21 +0000 |
commit | 0829bb1a04b87483db4be6695f2f97fe13899c12 (patch) | |
tree | dee745b16d8a8de84edebbe7ebad277653f89351 /net | |
parent | 0cf4bf7964b2ec0e1e0a0e4e64ddea1796a9b5e2 (diff) | |
download | prosody-0829bb1a04b87483db4be6695f2f97fe13899c12.tar.gz prosody-0829bb1a04b87483db4be6695f2f97fe13899c12.zip |
net.http: track time of request for debug/stats purposes
Diffstat (limited to 'net')
-rw-r--r-- | net/http.lua | 2 |
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 = "/"; |