# HG changeset patch # User Matthew Wild # Date 1335419237 -3600 # Node ID d6c4e58333cf2b75dad3743d9e53d04a065f08d2 # Parent 684ea42ca77a7646e75d32c2be7fae63d460bd58 net.http.server: Lower score of wildcard handlers to ensure specific handlers beat them diff -r 684ea42ca77a -r d6c4e58333cf net/http/server.lua --- a/net/http/server.lua Thu Apr 26 06:42:02 2012 +0100 +++ b/net/http/server.lua Thu Apr 26 06:47:17 2012 +0100 @@ -41,7 +41,7 @@ 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