diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-01-22 22:55:49 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-01-22 22:55:49 +0000 |
commit | 4d7ce5ef98953b67c80cc7f2fc347f01ad9cdd4e (patch) | |
tree | acc1b9c5576f0ba21b56fd5b133a4a173798d042 /net/http.lua | |
parent | b803655fc3922d51ccfb44eebe8540e3ba562b2b (diff) | |
parent | 075f0cbd7c732c108e03ec8596e9934db7b8b06a (diff) | |
download | prosody-4d7ce5ef98953b67c80cc7f2fc347f01ad9cdd4e.tar.gz prosody-4d7ce5ef98953b67c80cc7f2fc347f01ad9cdd4e.zip |
Merge with trunk
Diffstat (limited to 'net/http.lua')
-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"; |