Software /
code /
prosody
Changeset
5356:97197ca60cb2
Merge...
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 20 Mar 2013 20:35:59 +0000 |
parents | 5355:11eff33f60d3 (diff) 5352:e10f701c2082 (current diff) |
children | 5364:61cf6b84ae81 |
files | |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/http.lua Sat Mar 16 18:49:14 2013 +0100 +++ b/net/http.lua Wed Mar 20 20:35:59 2013 +0000 @@ -188,7 +188,12 @@ 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