net.http: Fix for Lua 5.2: return error from error handler (xpcall changed)
authorMatthew Wild <mwild1@gmail.com>
Sat, 24 Mar 2018 11:29:04 +0000
changeset 8692 c7122fbe1600
parent 8691 019b4b3dd5ad
child 8693 0f6623712239
net.http: Fix for Lua 5.2: return error from error handler (xpcall changed)
net/http.lua
--- a/net/http.lua	Sat Mar 24 21:39:03 2018 +0100
+++ b/net/http.lua	Sat Mar 24 11:29:04 2018 +0000
@@ -36,7 +36,7 @@
 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((...)));