rails/rails — pull request #16018 by rafaelfranca (2014-07-02 15:15:12+00:00)
Title: Override Rack::Request#media_type instead of #content_type

`Rack::Request#content_type` is used by a lot of `Rack::Request` methods like `#media_type_params` and `#content_charset`. All these methods expect `#content_type` to be the full `env['CONTENT_TYPE']` header.

Since we are overriding `#content_type` to return only the `Mime::Type.to_s` these methods stop to work since no information about media type parameters are returned on `#content_type`.

These is a subtle change of behaviour here since `#content_type` will return more information than before so I'm not sure we should apply this patch without a proper deprecation path pointing people to use `media_type` when expecting only the media type.

@jeremy @tenderlove let me know what you think about this change of behaviour.