mod_http: Fix specifying method in app route keys

vault/0.11
Matthew Wild 14 years ago
parent 1dea1062ea
commit 3e2df1d2fe
  1. 7
      plugins/mod_http.lua

@ -19,10 +19,11 @@ end
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;

Loading…
Cancel
Save