Software /
code /
prosody
Changeset
4472:9a4a82629bf3
Merge with 0.9
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 17 Jan 2012 00:31:30 +0000 |
parents | 4468:938d878d8087 (current diff) 4471:ea24d73e6c94 (diff) |
children | 4473:7e2cf20aef74 |
files | |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/net/http.lua Mon Jan 16 04:44:23 2012 +0000 +++ b/net/http.lua Tue Jan 17 00:31:30 2012 +0000 @@ -70,7 +70,7 @@ local function success_cb(r) if request.callback then for k,v in pairs(r) do request[k] = v; end - request.callback(r.body, r.code, request); + request.callback(r.body, r.code, request, r); request.callback = nil; end destroy_request(request); @@ -148,7 +148,7 @@ req.handler, req.conn = server.wrapclient(conn, req.host, port, listener, "*a", using_https and { mode = "client", protocol = "sslv23" }); req.write = function (...) return req.handler:write(...); end - req.callback = function (content, code, request) log("debug", "Calling callback, status %s", code or "---"); return select(2, xpcall(function () return callback(content, code, request) end, handleerr)); end + req.callback = function (content, code, request, response) log("debug", "Calling callback, status %s", code or "---"); return select(2, xpcall(function () return callback(content, code, request, response) end, handleerr)); end req.reader = request_reader; req.state = "status";