0
0
Fork 0

Federate header images, fix open-uri http->https redirection error

This commit is contained in:
Eugen Rochko 2017-03-18 22:51:20 +01:00
parent 5cfc9c7487
commit 2816b1bf8e
6 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,8 @@
require 'open-uri'
module OpenURI
def OpenURI.redirectable?(uri1, uri2) # :nodoc:
uri1.scheme.downcase == uri2.scheme.downcase ||
(/\A(?:http|https|ftp)\z/i =~ uri1.scheme && /\A(?:http|https|ftp)\z/i =~ uri2.scheme)
end
end