diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-01-17 00:31:30 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-01-17 00:31:30 +0000 |
commit | f6b941fe1c0f62eb4f4e074a8913f6e2cfcea845 (patch) | |
tree | fb494f3c4296132a4dd76345f99d2a599d2c6b61 /net | |
parent | 5d81665f61754324c10879d5ef7bf259c4e3debf (diff) | |
parent | 2929035ea843a1cd7b6279b80749822b9c56c730 (diff) | |
download | prosody-f6b941fe1c0f62eb4f4e074a8913f6e2cfcea845.tar.gz prosody-f6b941fe1c0f62eb4f4e074a8913f6e2cfcea845.zip |
Merge with 0.9
Diffstat (limited to 'net')
-rw-r--r-- | net/http.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/http.lua b/net/http.lua index 2b2f7258..6287f408 100644 --- a/net/http.lua +++ b/net/http.lua @@ -70,7 +70,7 @@ local function request_reader(request, data, startpos) 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 @@ function request(u, ex, callback) 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"; |