mitsuhiko/werkzeug — pull request #205 by jessaustin (2012-07-23 17:55:34+00:00)
Title: Handle media types with parameters

Some media types included in the *Accept* header include parameters. These media type parameters are distinct from *q* and any other "accept-param", and are listed before *q*. Currently *werkzeug* uses a regular expression (*\_accept\_re*) that splits these parameters out into separate media types in the *MIMEAccept* object, which often causes errors. With this patch these parameters are properly included in the strings with their associated media types. Application code then has the option of using the entire media type string (including media type parameters) to control behavior. (See [sections 3.7](http://tools.ietf.org/html/rfc2616#section-3.7) and [14.1](http://tools.ietf.org/html/rfc2616#section-14.1) of [RFC2616](http://tools.ietf.org/html/rfc2616) for more information.)