aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-24 16:02:30 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-24 16:02:30 +0100
commit3e2df1d2fe330c599df89109ac95251bf6ff8450 (patch)
tree3813f586d182a01b526adc603313ae2c727776d9 /plugins/mod_http.lua
parent1dea1062ea7a5a446bd72b82bab5ce373294e9d8 (diff)
downloadprosody-3e2df1d2fe330c599df89109ac95251bf6ff8450.tar.gz
prosody-3e2df1d2fe330c599df89109ac95251bf6ff8450.zip
mod_http: Fix specifying method in app route keys
Diffstat (limited to 'plugins/mod_http.lua')
-rw-r--r--plugins/mod_http.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 3dcb14d7..6da4db24 100644
--- a/plugins/mod_http.lua
+++ b/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;