plugins/mod_http.lua
changeset 4678 9613673f916a
parent 4669 0e0a72679f77
child 4696 4700e318add1
--- a/plugins/mod_http.lua	Tue Apr 24 16:00:20 2012 +0100
+++ b/plugins/mod_http.lua	Tue Apr 24 16:02:30 2012 +0100
@@ -19,10 +19,11 @@
 
 local function get_http_event(host, app_path, key)
 	local method, path = key:match("^(%S+)%s+(.+)$");
-	if not method and key:sub(1,1) == "/" then
+	if not method then
+		if key:sub(1,1) ~= "/" then
+			return nil;
+		end
 		method, path = "GET", key;
-	else
-		return nil;
 	end
 	path = normalize_path(path);
 	return method:upper().." "..host..app_path..path;