From cf9743127cbca95472fde5f6d57956002272bd2d Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 24 Mar 2018 11:29:04 +0000 Subject: net.http: Fix for Lua 5.2: return error from error handler (xpcall changed) --- net/http.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net') diff --git a/net/http.lua b/net/http.lua index c17d734c..01dfd7bc 100644 --- a/net/http.lua +++ b/net/http.lua @@ -36,7 +36,7 @@ local function make_id(req) return (tostring(req):match("%x+$")); end local listener = { default_port = 80, default_mode = "*a" }; -- Request-related helper functions -local function handleerr(err) log("error", "Traceback[http]: %s", traceback(tostring(err), 2)); end +local function handleerr(err) log("error", "Traceback[http]: %s", traceback(tostring(err), 2)); return err; end local function log_if_failed(id, ret, ...) if not ret then log("error", "Request '%s': error in callback: %s", id, tostring((...))); -- cgit v1.2.3