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
commitc178786878c733d4fdfa9bd98bb030a5280be197 (patch)
treeb73e613e768075eec0652aefaf2d6956a2b16566 /net/http.lua
parent842b340ebe3c355be231d97fe2fa8f4dd7289711 (diff)
downloadprosody-c178786878c733d4fdfa9bd98bb030a5280be197.tar.gz
prosody-c178786878c733d4fdfa9bd98bb030a5280be197.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);