lib/open_uri_w_redirect_to_https.rb
# `redirectable?` patch that uses a thread-local variable to
# determine whether HTTP to HTTPS redirection should be allowed
# (as well)
#
# unless the dynamic or global `:redirect_to_https` setting is set
# to `:always`, only the behaviour of calls through `open_uri`
# will be changed (as per argument or dynamic or global setting)
`redirectable?` patch that uses a thread-local variable to
determine whether HTTP to HTTPS redirection should be allowed
(as well)


` redirectable? ` patch that uses a thread - local variable to determine whether HTTP to HTTPS redirection should be allowed ( as well )
def redirectable?(uri1, uri2)
      if  redirect_to_https? == :always ||
          Thread.current[:__open_uri_w_redirect_to_https__]
        redirectable_w_redirect_to_https? uri1, uri2
      else
        redirectable_orig? uri1, uri2
      end
    end
def redirectable? ( uri1 , uri2 ) if redirect_to_https? == :always || Thread . current [ :__open_uri_w_redirect_to_https__ ] redirectable_w_redirect_to_https? uri1 , uri2 else redirectable_orig? uri1 , uri2 end end
`redirectable?` patch that uses a thread-local variable to
determine whether HTTP to HTTPS redirection should be allowed
(as well)
` redirectable? ` patch that uses a thread - local variable to determine whether HTTP to HTTPS redirection should be allowed ( as well )
uri1
<not_specific>
uri2
<not_specific>