# HG changeset patch # User Matthew Wild # Date 1335279750 -3600 # Node ID 9613673f916a7ab70097c82be5bea149e5defe72 # Parent 05d8b4099cf55abad2a4db84eefba885d44f5ce0 mod_http: Fix specifying method in app route keys diff -r 05d8b4099cf5 -r 9613673f916a plugins/mod_http.lua --- 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;