Software /
code /
prosody
Changeset
4694:f9a091b6dfd5
net.http.server: Fix to compare priority if path lengths are the same (logic fail)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 26 Apr 2012 04:24:43 +0100 |
parents | 4693:7ef4faa056fb |
children | 4695:838ad61c6b2c |
files | net/http/server.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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