Software /
code /
prosody
Changeset
4678:9613673f916a
mod_http: Fix specifying method in app route keys
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 24 Apr 2012 16:02:30 +0100 |
parents | 4677:05d8b4099cf5 |
children | 4679:5b52b5eaa03d |
files | plugins/mod_http.lua |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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;