aboutsummaryrefslogtreecommitdiffstats
path: root/net/http.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-07-07 20:31:52 +0200
committerKim Alvefur <zash@zash.se>2017-07-07 20:31:52 +0200
commit708ce26bc81ce86b5f0a23f4beb3119210ab6d8f (patch)
treef0ca0b0178bc2b732f8d8a82691a084c366c990a /net/http.lua
parent450544aad0a236e7ebcf3307e8fe8dbda683d775 (diff)
downloadprosody-708ce26bc81ce86b5f0a23f4beb3119210ab6d8f.tar.gz
prosody-708ce26bc81ce86b5f0a23f4beb3119210ab6d8f.zip
net.http: Move default SSL/TLS settings into options, allowing them to be overriden in new()
Diffstat (limited to 'net/http.lua')
-rw-r--r--net/http.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/http.lua b/net/http.lua
index 0d14e526..756deaf4 100644
--- a/net/http.lua
+++ b/net/http.lua
@@ -196,7 +196,7 @@ local function request(self, u, ex, callback)
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 @@ local function new(options)
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)