diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-01-12 15:57:21 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-01-12 15:57:21 +0000 |
commit | ae05f31b934ed7923e91f3d94561b7278ff96568 (patch) | |
tree | c0341a29f26a86aad433c34a811b89d1c850419c /lib | |
parent | 6e113069ee929d5e0ea788da44c8eb981c3c4f74 (diff) |
properly support ssl
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/httputil.rb | 4 |
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) |