plugins/mod_http.lua
changeset 4721 1c6c4c53f08a
parent 4720 fddc2797a96a
child 4724 a8c234332258
--- a/plugins/mod_http.lua	Fri Apr 27 18:36:27 2012 +0100
+++ b/plugins/mod_http.lua	Fri Apr 27 18:37:40 2012 +0100
@@ -18,13 +18,12 @@
 
 local function get_http_event(host, app_path, key)
 	local method, path = key:match("^(%S+)%s+(.+)$");
-	if not method then
-		if key:sub(1,1) ~= "/" then
-			return nil;
-		end
-		method, path = "GET", key;
+	if not method then -- No path specified, default to "" (base path)
+		method, path = key, "";
 	end
-	path = normalize_path(path);
+	if method:sub(1,1) == "/" then
+		return nil;
+	end
 	return method:upper().." "..host..app_path..path;
 end