summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2006-01-12 15:57:21 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2006-01-12 15:57:21 +0000
commitae05f31b934ed7923e91f3d94561b7278ff96568 (patch)
treec0341a29f26a86aad433c34a811b89d1c850419c /lib
parent6e113069ee929d5e0ea788da44c8eb981c3c4f74 (diff)
properly support ssl
Diffstat (limited to 'lib')
-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)