Breakage with Rack 1.0.0

Rack 1.0.0 call Rack::Request#media_type in new places, specifically, when it checks whether a POST request contains parseable data as it does in Rack::Request#POST. Rack::Request#media_type expects Request#content_type to return a string which is not the case for ActionController::Request derived from Rack::Request. As content_type is not a string, an exception is raised when Rack calls #split on it.

The eerie part of this is that AC#POST overrides RR#POST, still the error occurs in RR#POST. Specifically, the error occurs in a GET request with application/json content_type. The call to #POST happens through its alias request_parameters.

I've tried this with Rails 2.3.2 and 2-3-stable, both work fine with Rack 0.9.1, but exhibit the problem described above with Rack 1.0.0.

See #2564 AC::Request#content_type should return a string - Ruby on Rails - rails for a ticket I created when I understood even less about this then I do now.

Michael