diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-24 16:02:30 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-24 16:02:30 +0100 |
commit | 904d33cce45285aeb581b4b22cea418204ccbbed (patch) | |
tree | 3813f586d182a01b526adc603313ae2c727776d9 /plugins | |
parent | 64d127307adc8aa401d7ae4a964298cae4d08016 (diff) | |
download | prosody-904d33cce45285aeb581b4b22cea418204ccbbed.tar.gz prosody-904d33cce45285aeb581b4b22cea418204ccbbed.zip |
mod_http: Fix specifying method in app route keys
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_http.lua | 7 |
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; |