Software /
code /
prosody
Comparison
net/http/server.lua @ 6589:015f2b4e2f9a
net.http.server: Log event name when firing a request event
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 14 Mar 2015 22:39:03 +0000 |
parent | 6380:4220ffb87b22 |
child | 6602:61b6a4fc65f1 |
child | 6604:478308ee29dd |
child | 6607:64e6b88b6b21 |
child | 7579:d430573fe9f8 |
comparison
equal
deleted
inserted
replaced
6579:5a82ee60e07e | 6589:015f2b4e2f9a |
---|---|
215 return; | 215 return; |
216 end | 216 end |
217 | 217 |
218 local event = request.method.." "..host..request.path:match("[^?]*"); | 218 local event = request.method.." "..host..request.path:match("[^?]*"); |
219 local payload = { request = request, response = response }; | 219 local payload = { request = request, response = response }; |
220 --log("debug", "Firing event: %s", event); | 220 log("debug", "Firing event: %s", event); |
221 local result = events.fire_event(event, payload); | 221 local result = events.fire_event(event, payload); |
222 if result ~= nil then | 222 if result ~= nil then |
223 if result ~= true then | 223 if result ~= true then |
224 local body; | 224 local body; |
225 local result_type = type(result); | 225 local result_type = type(result); |