Diff

net/httpserver.lua @ 4143:eccd3c87d717

net.httpserver: Log when an error occurs inside a HTTP request handler
author Matthew Wild <mwild1@gmail.com>
date Sun, 13 Feb 2011 22:57:17 +0000
parent 4072:ce3d100d9ebb
child 4161:c299726d2b4e
line wrap: on
line diff
--- a/net/httpserver.lua	Thu Feb 03 13:13:49 2011 +0500
+++ b/net/httpserver.lua	Sun Feb 13 22:57:17 2011 +0000
@@ -122,6 +122,7 @@
 			call_callback(request);
 		end
 		local function error_cb(r)
+			log("error", "Error in HTTP server handler: %s", r or "connection-closed");
 			call_callback(request, r or "connection-closed");
 			destroy_request(request);
 		end