net.httpserver: Log when an error occurs inside a HTTP request handler

This commit is contained in:
Matthew Wild 2011-02-13 22:57:17 +00:00
parent bbb4eabf46
commit 404c107e3f

View file

@ -122,6 +122,7 @@ local function request_reader(request, data, startpos)
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