Skip to content

Insufficient handling of Accept header #156

Description

@kreynolds

I've run across this in a number of projects so I'm adding it here as an FYI. Accept headers can contain a number of things including quoted tokens, spaces between quality and type.subtype, etc and while the spec seems to indicate that quality should go first after the type, it appears optional/unclear in subsequent examples. I don't have the time to actually put it together in a PR but maybe somebody else can. The bit that returns Mime::Whatever would need to be changed but the rest appears sound.

https://github.com/kreynolds/rails/blob/fix-broken-mime-parsing-and-ordering/actionpack/lib/action_dispatch/http/mime_type.rb#L140

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions