rails/rails — pull request #5290 by steveklabnik (2012-03-05 20:13:18+00:00)
Title: Added parsing of arbitrary media type parameters.

Mime types can accept arbitrary parameters. Right now, we only supported the q parameter, this extends them to arbitrary ones.

Here's the grammar: http://www.ietf.org/rfc/rfc2045.txt

This parsing is still not fantastic: the regexp might be made better, since it doesn't ensure that we have both actual quotes. Also, I'm not 100% \w matches up with ''

Related: #4918 and #4127.