mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 21:57:45 +03:00
Merge 0.9->0.10
This commit is contained in:
commit
535e8c1102
2 changed files with 3 additions and 6 deletions
|
@ -20,6 +20,7 @@ local t_insert, t_concat = table.insert, table.concat;
|
|||
local pairs = pairs;
|
||||
local tonumber, tostring, xpcall, select, traceback =
|
||||
tonumber, tostring, xpcall, select, debug.traceback;
|
||||
local assert, error = assert, error
|
||||
|
||||
local log = require "util.logger".init("http");
|
||||
|
||||
|
@ -173,7 +174,7 @@ 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue