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 https://rails.lighthouseapp.com/projects/8994/tickets/2564 for a 
ticket I created when I understood even less about this then I do now.

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to