]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/httputil.rb
test
[user/henk/code/ruby/rbot.git] / lib / rbot / httputil.rb
index b4f25c95e77aa6de7ac5e4689d7f11c9e4a928f8..e073a56d908109462c70edf7f416010ed4a9df09 100644 (file)
@@ -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,9 @@ 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"
+    return h
   end
 
   # uri::         uri to query (Uri object)