From ae05f31b934ed7923e91f3d94561b7278ff96568 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Thu, 12 Jan 2006 15:57:21 +0000 Subject: properly support ssl --- lib/rbot/httputil.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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) -- cgit v1.2.3