Module: OpenURI
- Defined in:
- lib/cinch/toolbox.rb
Overview
Patch OpenURI to allow for redirection from http => https
Class Method Summary collapse
-
.redirectable?(uri1, uri2) ⇒ Boolean
:nodoc:.
Class Method Details
.redirectable?(uri1, uri2) ⇒ Boolean
:nodoc:
164 165 166 167 168 |
# File 'lib/cinch/toolbox.rb', line 164 def self.redirectable?(uri1, uri2) # :nodoc: uri1.scheme.downcase == uri2.scheme.downcase || /\A(?:http|ftp)\z/i =~ uri1.scheme && /\A(?:http|ftp|https)\z/i =~ uri2.scheme end |