Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error redirection forbidden #1

Open
marceloboeira opened this issue Jan 1, 2017 · 2 comments
Open

Error redirection forbidden #1

marceloboeira opened this issue Jan 1, 2017 · 2 comments

Comments

@marceloboeira
Copy link

Whenever the feed's link redirects us a RuntimeError is generated.

>> PodcastReader.new("http://canaltech.com.br/rss/podcast/")
RuntimeError: redirection forbidden: http://canaltech.com.br/rss/podcast/ -> https://canaltech.com.br/rss/podcast/
>>
@kule
Copy link
Owner

kule commented Jan 1, 2017

Thanks for this Marcelo, I'll have a look tomorrow - couple of things with a quick look:

  1. The current test doesn't seem to fail if I remove the added redirection code?
  2. I was wondering if we could do without the extra dependency and just use something like the redirect behaviour shown here instead: https://twin.github.io/improving-open-uri/

@marceloboeira
Copy link
Author

marceloboeira commented Jan 1, 2017

@kule

  1. I will have to investigate if ShamRack is redirecting for real or if the problem was with a specific kind of redirection.

Update The problems seems to be the http->https redirection, still investigating.

  1. I looked at it, but it seemed quite an unnecessary workaround.

OpenURI itself does not seem an appropriate dependency, it would be interesting to have an injected dependency to handle the XML download, that would be my next step. I was handling the redirection with the dependency temporarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants