# HG changeset patch # User Kim Alvefur # Date 1499452312 -7200 # Node ID 55826e29c719672f64e2199c8319bcf99ea903f7 # Parent bc2bcfa63b4382d0bf537131c0a80fd8552207a2 net.http: Move default SSL/TLS settings into options, allowing them to be overriden in new() diff -r bc2bcfa63b43 -r 55826e29c719 net/http.lua --- a/net/http.lua Fri Jul 07 20:30:52 2017 +0200 +++ b/net/http.lua Fri Jul 07 20:31:52 2017 +0200 @@ -196,7 +196,7 @@ local sslctx = false; if using_https then - sslctx = ex and ex.sslctx or { mode = "client", protocol = "sslv23", options = { "no_sslv2", "no_sslv3" } }; + sslctx = ex and ex.sslctx or self.options and self.options.sslctx; end local handler, conn = server.addclient(host, port_number, listener, "*a", sslctx) @@ -239,7 +239,9 @@ return http; end -local default_http = new(); +local default_http = new({ + sslctx = { mode = "client", protocol = "sslv23", options = { "no_sslv2", "no_sslv3" } }; +}); return { request = function (u, ex, callback)