Forum: Ruby bug in OpenURI#redirectable?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ea97ad3789541367331966f009f549cb?d=identicon&s=25 Chris McMahon (Guest)
on 2007-02-26 20:20
(Received via mailing list)
Use open-uri to go to http://www.gmail.com

Receive error message

"redirection forbidden: http://mail.google.com/mail/ ->
https://www.google.com/accounts/Ser..."

Comment out this from open-uri:

      #unless OpenURI.redirectable?(uri, redirect)
      #  raise "redirection forbidden: #{uri} -> #{redirect}"
      # end

Try again and receive this error:

certificate verify failed (OpenSSL::SSL::SSLError)

In this case, looking at the packets, open-uri seems to be mangling
something on the redirect, because the cookie being set is expired.  I
haven't pursued any more diagnosis on the error, but if anyone could
suggest a way to make this work correctly, I would be happy to hear
it.

Thanks.
This topic is locked and can not be replied to.