Changeset

4634:8e582afc214d

net.http.server: Fire global HTTP event when no specific handlers available.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 21 Apr 2012 17:38:01 +0500
parents 4633:92e1a538f8b0
children 4635:ea5215bd2783
files net/http/server.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/http/server.lua	Sat Apr 21 17:37:00 2012 +0500
+++ b/net/http/server.lua	Sat Apr 21 17:38:01 2012 +0500
@@ -129,6 +129,7 @@
 			--log("debug", "Event: %s", event);
 			if events.fire_event(event, payload) ~= nil then return; end
 			-- TODO try adding/stripping / at the end, but this needs to work via an HTTP redirect
+			if events.fire_event("*", payload) ~= nil then return; end
 		end
 
 		-- if handler not called, fallback to legacy httpserver handlers