lib/extensions/http.rb in radiospieler-0.3.11 vs lib/extensions/http.rb in radiospieler-0.3.12
- old
+ new
@@ -1,5 +1,6 @@
+require 'addressable/uri'
require 'net/http'
require 'simple_cache'
require 'nokogiri'
# The Http module defines a
@@ -48,10 +49,10 @@
private
def get_body_and_headers_(uri_str, limit = 10)
raise 'too many redirections' if limit == 0
- uri = URI.parse(uri_str)
+ uri = Addressable::URI.parse(uri_str)
http = Net::HTTP.new(uri.host, uri.port)
if uri.scheme == "https"
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE