From: Matthew Wild Date: Mon, 16 Dec 2013 23:32:11 +0000 (+0000) Subject: Merge 0.9->0.10 X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=a2fc95c857560f2c3221afcb0967f82fbbf3ce93;p=prosody.git Merge 0.9->0.10 --- a2fc95c857560f2c3221afcb0967f82fbbf3ce93 diff --cc net/http.lua index 6ddb1900,5ec3163c..ab9ec7b6 --- a/net/http.lua +++ b/net/http.lua @@@ -174,9 -173,9 +174,9 @@@ function request(u, ex, callback sslctx = ex and ex.sslctx or { mode = "client", protocol = "sslv23", options = { "no_sslv2" } }; end - req.handler, req.conn = server.wrapclient(conn, host, port_number, listener, "*a", sslctx); + req.handler, req.conn = assert(server.wrapclient(conn, host, port_number, listener, "*a", sslctx)); req.write = function (...) return req.handler:write(...); 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";