From 37840f043cbe439e89ea82dbb34c208f47845ce0 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 26 Apr 2012 04:24:43 +0100 Subject: net.http.server: Fix to compare priority if path lengths are the same (logic fail) --- net/http/server.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/http/server.lua b/net/http/server.lua index c108a398..58554f39 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -50,7 +50,7 @@ setmetatable(events._handlers, { table.sort(handlers_array, function(b, a) local a_score, b_score = matching_handlers_set[a], matching_handlers_set[b]; for i = 1, #a_score do - if a ~= b then -- If equal, compare next score value + if a_score[i] ~= b_score[i] then -- If equal, compare next score value return a_score[i] < b_score[i]; end end -- cgit v1.2.3