Fix bug.
This commit is contained in:
parent
af8e3bc214
commit
6343fb00d3
|
@ -100,9 +100,12 @@ class Admin::FeedsController < OrbitAdminController
|
||||||
puts url
|
puts url
|
||||||
uri = URI.parse(URI.decode(url).encode)
|
uri = URI.parse(URI.decode(url).encode)
|
||||||
begin
|
begin
|
||||||
res = Timeout.timeout(10){Net::HTTP.get_response(uri).body}
|
res = Timeout.timeout(10){Net::HTTP.get_response(uri).body}
|
||||||
rescue
|
rescue
|
||||||
res = nil
|
http = Net::HTTP.new(uri.host, uri.port)
|
||||||
|
http.use_ssl = true if (uri.scheme == "https")
|
||||||
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||||
|
res = http.get(uri.request_uri).body rescue nil
|
||||||
puts uri.to_s
|
puts uri.to_s
|
||||||
puts uri.hostname
|
puts uri.hostname
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue