aboutsummaryrefslogtreecommitdiffstats
path: root/net/http.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-03-20 20:34:38 +0000
committerMatthew Wild <mwild1@gmail.com>2013-03-20 20:34:38 +0000
commit74531442db8df026d362695700a9ff23345dde96 (patch)
treed2c50b12dcf99d03ae30b92a7b72a9ea2203b31b /net/http.lua
parent58049837e7a14744f37d0250c3a854bc312d9106 (diff)
parent0c46e400afa7fef669b2f3a9ea2ed76633e8652b (diff)
downloadprosody-74531442db8df026d362695700a9ff23345dde96.tar.gz
prosody-74531442db8df026d362695700a9ff23345dde96.zip
Merge 0.9->trunk
Diffstat (limited to 'net/http.lua')
-rw-r--r--net/http.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/http.lua b/net/http.lua
index 273eee09..a1e4e523 100644
--- a/net/http.lua
+++ b/net/http.lua
@@ -188,7 +188,12 @@ function request(u, ex, callback)
return nil, err;
end
- req.handler, req.conn = server.wrapclient(conn, req.host, port, listener, "*a", using_https and { mode = "client", protocol = "sslv23" });
+ local sslctx = false;
+ if using_https then
+ sslctx = ex and ex.sslctx or { mode = "client", protocol = "sslv23", options = { "no_sslv2" } };
+ end
+
+ req.handler, req.conn = server.wrapclient(conn, req.host, port, 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