Software /
code /
prosody
Diff
plugins/mod_http.lua @ 5230:6f5640375358
mod_http: Fix path length pattern
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Dec 2012 12:20:55 +0100 |
parent | 5204:0b4f680ea116 |
child | 5332:5b73ac268a9e |
line wrap: on
line diff
--- a/plugins/mod_http.lua Sun Dec 09 12:19:08 2012 +0100 +++ b/plugins/mod_http.lua Sun Dec 09 12:20:55 2012 +0100 @@ -88,7 +88,7 @@ local data = handler; handler = function () return data; end elseif event_name:sub(-2, -1) == "/*" then - local base_path_len = #event_name:match("(/.+/)%*$")+1; + local base_path_len = #event_name:match("/.+$"); local _handler = handler; handler = function (event) local path = event.request.path:sub(base_path_len);