This project is archived and is in readonly mode.
parse_formatted_request_parameters does not respect parameters[:format]
Reported by Brad Gessler | August 1st, 2008 @ 05:12 PM | in 2.x
I have been working on a project where I need to parse various flavors of XML that are POSTed from various SMS message aggregators into request_parameters. I tried to take advantage of the built in ActionController::Base.param_parsers but ran into some serious problems.
Since I can't control the aggregators' HTTP Content-Type headers to resolve the Mime::Type, I need to rely on the ':format' idiom in Rails routes. So instead of an HTTP POST to '/sms_messages.xml' I POST to '/sms_messages.clickatell'. Unfortunately the format parameter isn't parsed out of the request until after the param_parser is selected:
http://github.com/rails/rails/tr...
It appears that the content_type variable can only resolved from the Content-Type header at this point and not from params[:format] (or any other parameters for this matter). I need rails to respect the format of the request over the Content-Type header on a POST or PUT.
Comments and changes to this ticket
-
josh November 22nd, 2008 @ 07:52 PM
- State changed from new to stale
Staling out, please let me know if its still an issue.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>