From 904d33cce45285aeb581b4b22cea418204ccbbed Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 24 Apr 2012 16:02:30 +0100 Subject: mod_http: Fix specifying method in app route keys --- plugins/mod_http.lua | 7 ++++--- 1 file 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; -- cgit v1.2.3