aboutsummaryrefslogtreecommitdiffstats
path: root/net/http.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-04-22 12:35:52 +0100
committerMatthew Wild <mwild1@gmail.com>2013-04-22 12:35:52 +0100
commit4602591c38c128e44da7535d25baf3647dadc9e1 (patch)
tree6c58b0d65feb36b1f99fee431faadd042cf4f5ec /net/http.lua
parentc981dcb50dd439cd986e20a60dde67c52b26b7ae (diff)
downloadprosody-4602591c38c128e44da7535d25baf3647dadc9e1.tar.gz
prosody-4602591c38c128e44da7535d25baf3647dadc9e1.zip
mod_c2s, mod_s2s, net.http, net.http.server: Improve tracebacks (omit traceback function), to make it clearer where an error occured
Diffstat (limited to 'net/http.lua')
-rw-r--r--net/http.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/http.lua b/net/http.lua
index 639ecf6a..3b783a41 100644
--- a/net/http.lua
+++ b/net/http.lua
@@ -17,9 +17,9 @@ local ssl_available = pcall(require, "ssl");
local server = require "net.server"
local t_insert, t_concat = table.insert, table.concat;
-local pairs, ipairs = pairs, ipairs;
-local tonumber, tostring, xpcall, select, debug_traceback, char, format =
- tonumber, tostring, xpcall, select, debug.traceback, string.char, string.format;
+local pairs = pairs;
+local tonumber, tostring, xpcall, select, traceback =
+ tonumber, tostring, xpcall, select, debug.traceback;
local log = require "util.logger".init("http");
@@ -101,7 +101,7 @@ local function request_reader(request, data, err)
request.parser:feed(data);
end
-local function handleerr(err) log("error", "Traceback[http]: %s: %s", tostring(err), debug_traceback()); end
+local function handleerr(err) log("error", "Traceback[http]: %s", traceback(tostring(err), 2)); end
function request(u, ex, callback)
local req = url.parse(u);