Ensure Rack::Utils.best_q_match to respect requested content type #659

Merged
merged 1 commit into from Jul 5, 2014

Conversation

Projects
None yet
2 participants
@jodosha
Contributor

jodosha commented Feb 13, 2014

I've tried to use this method like this:

Rack::Utils.best_q_match "application/json", Rack::Mime::MIME_TYPES.values

It was returning "application/vnd.lotus-1-2-3" instead of "application/json".

Hint:

puts Rack::Mime::MIME_TYPES.values.first # => "application/vnd.lotus-1-2-3"

raggi added a commit that referenced this pull request Jul 5, 2014

Merge pull request #659 from jodosha/utils-best_q_match-respect-conte…
…nt-type

Ensure Rack::Utils.best_q_match to respect requested content type

@raggi raggi merged commit 186e256 into rack:master Jul 5, 2014

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment