Software /
code /
prosody
Comparison
net/http/server.lua @ 4689:e8c357259993
net.http.server: Small fix to comment
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 25 Apr 2012 15:02:27 +0100 |
parent | 4688:8d275c86a04f |
child | 4691:a164fc7057ae |
comparison
equal
deleted
inserted
replaced
4688:8d275c86a04f | 4689:e8c357259993 |
---|---|
32 local event_map = events._event_map; | 32 local event_map = events._event_map; |
33 setmetatable(events._handlers, { | 33 setmetatable(events._handlers, { |
34 __index = function (handlers, curr_event) | 34 __index = function (handlers, curr_event) |
35 if is_wildcard_event(curr_event) then return; end -- Wildcard events cannot be fired | 35 if is_wildcard_event(curr_event) then return; end -- Wildcard events cannot be fired |
36 -- Find all handlers that could match this event, sort them | 36 -- Find all handlers that could match this event, sort them |
37 -- and then put the array into handlers[event] | 37 -- and then put the array into handlers[curr_event] (and return it) |
38 local matching_handlers_set = {}; | 38 local matching_handlers_set = {}; |
39 local handlers_array = {}; | 39 local handlers_array = {}; |
40 for event, handlers_set in pairs(event_map) do | 40 for event, handlers_set in pairs(event_map) do |
41 if event == curr_event or | 41 if event == curr_event or |
42 is_wildcard_event(event) and is_wildcard_match(event, curr_event) then | 42 is_wildcard_event(event) and is_wildcard_match(event, curr_event) then |