mod_roster: Remove unused variable
[prosody.git] / net / http.lua
index 273eee090535196ebbf06309dbf832da6507b10b..a1e4e52308200b7c05d4e97fe6476c93805305ff 100644 (file)
@@ -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