97 local response = callback(request.method, request.body and t_concat(request.body), request); |
97 local response = callback(request.method, request.body and t_concat(request.body), request); |
98 if response then |
98 if response then |
99 if response == true and not request.destroyed then |
99 if response == true and not request.destroyed then |
100 -- Keep connection open, we will reply later |
100 -- Keep connection open, we will reply later |
101 log("warn", "Request %s left open, on_destroy is %s", request.id, tostring(request.on_destroy)); |
101 log("warn", "Request %s left open, on_destroy is %s", request.id, tostring(request.on_destroy)); |
102 else |
102 elseif response ~= true then |
103 -- Assume response |
103 -- Assume response |
104 send_response(request, response); |
104 send_response(request, response); |
105 destroy_request(request); |
105 destroy_request(request); |
106 end |
106 end |
107 else |
107 else |