Lighthouse has a new layout.
Prefer the old one? Return to the old layout,
and switch back any time from the link at the top of each page.
This project is archived and is in readonly mode.
parse_formatted_request_parameters does not respect parameters[:format]
#741
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:
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.
Reported by Brad Gessler ·
August 1st, 2008 @ 05:12 PM