mod_http: Fix path length pattern
authorKim Alvefur <zash@zash.se>
Sun, 9 Dec 2012 11:20:55 +0000 (12:20 +0100)
committerKim Alvefur <zash@zash.se>
Sun, 9 Dec 2012 11:20:55 +0000 (12:20 +0100)
plugins/mod_http.lua

index e73778ae630f9c4091dcec1410efbed34ac0d45d..018f2ea31f3d39c159650e64a65165c34971b76e 100644 (file)
@@ -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);