# HG changeset patch # User Matthew Wild # Date 1363811759 0 # Node ID 97197ca60cb285a9836c216ade54f9cb15889aab # Parent 11eff33f60d385a81783d835de8793fc135b6e01# Parent e10f701c208291bf14a91d9e4c4a3e3e0527fd6e Merge... diff -r e10f701c2082 -r 97197ca60cb2 net/http.lua --- 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