Skip to content

FollowRedirects should handle different intermediary response types #122

@christhekeele

Description

@christhekeele

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions