This project is archived and is in readonly mode.

#6183 ✓duplicate

Mime::Type.parse ignores accept-params in the HTTP_ACCEPT header

Reported by Lance | December 16th, 2010 @ 09:49 PM

In the case that a client sends only a single media-range but nevertheless includes accept-params, as in

Accept: text/xml; q=1

Mime::Type.parse fails to recognize this as the :xml mime type as parse just looks up the raw string in Mime::Type.lookup. See here:

It does seem odd that a client would send a header like this, but we encountered it in real life. Reading the HTTP 1.1 spec it seems that the header is valid.

This is in Rails 2.3.8. A patch is forthcoming.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket