Module: OpenURI
- Defined in:
- lib/retriever/openuri-redirect-patch.rb
Class Method Summary collapse
-
.redirectable?(uri1, uri2) ⇒ Boolean
nesc patch otherwise OPENURI blocks redirects to and from https.
Class Method Details
.redirectable?(uri1, uri2) ⇒ Boolean
nesc patch otherwise OPENURI blocks redirects to and from https
3 4 5 6 |
# File 'lib/retriever/openuri-redirect-patch.rb', line 3 def OpenURI.redirectable?(uri1, uri2) uri1.scheme.downcase == uri2.scheme.downcase || (/\A(?:http|https)\z/i =~ uri1.scheme && /\A(?:http|https)\z/i =~ uri2.scheme) end |