Software /
code /
prosody
Comparison
net/http/server.lua @ 6529:a2dadaa9137f
net.http.server: Log names of the events fired
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 08 Dec 2014 15:48:36 +0100 |
parent | 6382:57d23c26039b |
child | 6602:61b6a4fc65f1 |
child | 6604:478308ee29dd |
child | 6607:64e6b88b6b21 |
comparison
equal
deleted
inserted
replaced
6528:f0687c313cf1 | 6529:a2dadaa9137f |
---|---|
216 return; | 216 return; |
217 end | 217 end |
218 | 218 |
219 local event = request.method.." "..host..request.path:match("[^?]*"); | 219 local event = request.method.." "..host..request.path:match("[^?]*"); |
220 local payload = { request = request, response = response }; | 220 local payload = { request = request, response = response }; |
221 --log("debug", "Firing event: %s", event); | 221 log("debug", event); |
222 local result = events.fire_event(event, payload); | 222 local result = events.fire_event(event, payload); |
223 if result ~= nil then | 223 if result ~= nil then |
224 if result ~= true then | 224 if result ~= true then |
225 local body; | 225 local body; |
226 local result_type = type(result); | 226 local result_type = type(result); |