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

FollowRedirects should handle different intermediary response types #122

Open
christhekeele opened this issue Nov 2, 2015 · 0 comments
Open

Comments

@christhekeele
Copy link

christhekeele commented Nov 2, 2015

Currently, FollowRedirects will try to parse the body of 3xx responses with the requested Accepts type, rather than the intermediary Content-Type of the redirect response. This can cause it to blow up when, for example, a JSON API request issues a redirect with an HTML body as noted in rails/rails#17194.

We could either prevent it from actually doing the parsing on redirects (bad idea? possible with the way the middleware stack works?) or make it honor the intermediary Content-Type when parsing the body.

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

1 participant