Bug in OpenURI#redirectable?

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs