# HG changeset patch # User Matthew Wild # Date 1335410683 -3600 # Node ID f9a091b6dfd50d6088575dfa96cd39ef98883d56 # Parent 7ef4faa056fb4ef77002b3fc5001d63de8ac1f4b net.http.server: Fix to compare priority if path lengths are the same (logic fail) diff -r 7ef4faa056fb -r f9a091b6dfd5 net/http/server.lua --- 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