summaryrefslogtreecommitdiff
path: root/lib/rbot/httputil.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot/httputil.rb')
-rw-r--r--lib/rbot/httputil.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rbot/httputil.rb b/lib/rbot/httputil.rb
index b4f25c95..fec14fb9 100644
--- a/lib/rbot/httputil.rb
+++ b/lib/rbot/httputil.rb
@@ -3,6 +3,7 @@ module Utils
require 'resolv'
require 'net/http'
+require 'net/https'
Net::HTTP.version_1_2
# class for making http requests easier (mainly for plugins to use)
@@ -107,7 +108,8 @@ class HttpUtil
end
end
- return Net::HTTP.new(uri.host, uri.port, proxy_host, proxy_port, proxy_user, proxy_port)
+ h = Net::HTTP.new(uri.host, uri.port, proxy_host, proxy_port, proxy_user, proxy_port)
+ h.use_ssl = true if uri.scheme == "https"
end
# uri:: uri to query (Uri object)