# Mime sorting bug

**URL:** <https://www.ruby-forum.com/t/mime-sorting-bug/138298>\
**Category:** Rails\
**Created:** [May 21, 2008, 8:27pm UTC](https://www.ruby-forum.com/t/mime-sorting-bug/138298 "2008-05-21T20:27:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [May 21, 2008, 8:27pm UTC](https://www.ruby-forum.com/t/mime-sorting-bug/138298/1 "2008-05-21T20:27:51Z")

</div>

Question: should rails’ mime handling prefer to render ‘longer’ named  
mime-types?

It seems from the specs  
[http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)  
that the preferred mime-type is whichever is highest q value, or most  
specific.

currently rails render based on q value, and then just on order that  
they are listed by the browser.  
-R
