This project is archived and is in readonly mode.
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: https://github.com/rails/rails/blob/2-3-stable/actionpack/lib/actio...
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 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html it seems that the header is valid.
This is in Rails 2.3.8. A patch is forthcoming.
Comments and changes to this ticket
-
Lance December 16th, 2010 @ 10:00 PM
- no changes were found...
-
Lance December 16th, 2010 @ 10:01 PM
- Tag changed from http accepts, mime to http accepts, mime, patch
-
Piotr Sarnacki December 17th, 2010 @ 11:12 AM
- State changed from new to duplicate
- Importance changed from to Low
It's a duplicate: https://rails.lighthouseapp.com/projects/8994/tickets/5833-bug-in-m...
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>