aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-26 06:47:17 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-26 06:47:17 +0100
commitdbb3dc6a0112bac19582c811a788254e3cacef41 (patch)
tree3d37a91f9a7037641edf2d40247afb2586bb31de /net
parent0c686d4e7ae8fff6e71af4f5099c12720b352372 (diff)
downloadprosody-dbb3dc6a0112bac19582c811a788254e3cacef41.tar.gz
prosody-dbb3dc6a0112bac19582c811a788254e3cacef41.zip
net.http.server: Lower score of wildcard handlers to ensure specific handlers beat them
Diffstat (limited to 'net')
-rw-r--r--net/http/server.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/server.lua b/net/http/server.lua
index 58554f39..906b3eaf 100644
--- a/net/http/server.lua
+++ b/net/http/server.lua
@@ -41,7 +41,7 @@ setmetatable(events._handlers, {
if event == curr_event or
is_wildcard_event(event) and is_wildcard_match(event, curr_event) then
for handler, priority in pairs(handlers_set) do
- matching_handlers_set[handler] = { (select(2, event:gsub("/", "%1"))), priority };
+ matching_handlers_set[handler] = { (select(2, event:gsub("/", "%1"))), is_wildcard_event(event) and 0 or 1, priority };
table.insert(handlers_array, handler);
end
end