Comparison

net/http.lua @ 8707:fd39c44c0113

Merge 0.10 -> trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 04 Apr 2018 18:42:05 +0100
parent 8690:0f6623712239
parent 8706:e2919978673e
child 8731:6063f9211fd1
comparison
equal deleted inserted replaced
8701:b7a22baaf55f 8707:fd39c44c0113
98 req.http.events.fire_event("response", event); 98 req.http.events.fire_event("response", event);
99 content, code, response = event.content, event.code, event.response; 99 content, code, response = event.content, event.code, event.response;
100 end 100 end
101 101
102 log("debug", "Request '%s': Calling callback, status %s", req.id, code or "---"); 102 log("debug", "Request '%s': Calling callback, status %s", req.id, code or "---");
103 return log_if_failed(req.id, xpcall(function () return callback(content, code, request, response) end, handleerr)); 103 return log_if_failed(req.id, xpcall(function () return callback(content, code, response, request) end, handleerr));
104 end 104 end
105 req.reader = request_reader; 105 req.reader = request_reader;
106 req.state = "status"; 106 req.state = "status";
107 107
108 requests[req.conn] = req; 108 requests[req.conn] = req;