# HG changeset patch # User Matthew Wild # Date 1354155451 -18000 # Node ID b4de85209ccfad63448a922e4576c14dcaf88d73 # Parent f7ff48494c2bdc470cb6b1da7a8aec476eee461e# Parent a971bee1a5f5f3355de9a2f9e440ec43e5a29190 Merge diff -r a971bee1a5f5 -r b4de85209ccf plugins/mod_http.lua --- a/plugins/mod_http.lua Sun Nov 25 05:12:46 2012 +0100 +++ b/plugins/mod_http.lua Thu Nov 29 07:17:31 2012 +0500 @@ -88,10 +88,10 @@ local data = handler; handler = function () return data; end elseif event_name:sub(-2, -1) == "/*" then - local base_path = event_name:match("/(.+)/*$"); + local base_path_len = #event_name:match("(/.+/)%*$")+1; local _handler = handler; handler = function (event) - local path = event.request.path:sub(#base_path+1); + local path = event.request.path:sub(base_path_len); return _handler(event, path); end; end