aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_http.lua11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 93d58439..4c6c1299 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -18,13 +18,12 @@ end
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
+ if method:sub(1,1) == "/" then
+ return nil;
end
- path = normalize_path(path);
return method:upper().." "..host..app_path..path;
end