projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99c6159
)
mod_http: Fix path length pattern
author
Kim Alvefur
<zash@zash.se>
Sun, 9 Dec 2012 11:20:55 +0000
(12:20 +0100)
committer
Kim Alvefur
<zash@zash.se>
Sun, 9 Dec 2012 11:20:55 +0000
(12:20 +0100)
plugins/mod_http.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_http.lua
b/plugins/mod_http.lua
index e73778ae630f9c4091dcec1410efbed34ac0d45d..018f2ea31f3d39c159650e64a65165c34971b76e 100644
(file)
--- a/
plugins/mod_http.lua
+++ b/
plugins/mod_http.lua
@@
-88,7
+88,7
@@
function module.add_host(module)
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);