net.http.server: Fix to compare priority if path lengths are the same (logic fail)
--- a/net/http/server.lua Wed Apr 25 23:16:37 2012 +0100
+++ b/net/http/server.lua Thu Apr 26 04:24:43 2012 +0100
@@ -50,7 +50,7 @@
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