aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2018-10-05 13:14:53 +0200
committersteckbrief <steckbrief@chefmail.de>2018-10-05 13:14:53 +0200
commit30afe3e279c02bebe6d76bd012c5f00ab0274463 (patch)
tree71437a2e10d9181c710a6a6c33fc2f8b74829cfc
parent82c3719e0dbad12c5d26f346ec8ef41b48d48ee0 (diff)
parentaaa63c4d17f6c869fc4a6c52d48304aae68b5651 (diff)
Merge branch 'master' of ssh://repos.thedevstack.de/httpupload
-rw-r--r--prosody-module/mod_http_upload_external/mod_http_upload_external.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/prosody-module/mod_http_upload_external/mod_http_upload_external.lua b/prosody-module/mod_http_upload_external/mod_http_upload_external.lua
index 50c0bfa..4f4e83b 100644
--- a/prosody-module/mod_http_upload_external/mod_http_upload_external.lua
+++ b/prosody-module/mod_http_upload_external/mod_http_upload_external.lua
@@ -15,8 +15,9 @@ local xmpp_server_key = module:get_option("http_upload_external_server_key");
local filetransfer_manager_ui_url = module:get_option("filetransfer_manager_ui_url");
-- imports
+require"https";
local st = require"util.stanza";
-local http = require"socket.http";
+local http = (string.len(external_url) >= 5 and string.sub(external_url,1,5) == "https") and require"ssl.https" or require"socket.http";
local json = require"util.json";
local dataform = require "util.dataforms".new;
local ltn12 = require"ltn12";