Implement POST, PUT request parameters parsing driven by media types
Reported by Guilherme Silveira | April 3rd, 2010 @ 10:12 PM | in v0.7
Rails already offer a way to set a media type parameter parsing scheme, as the documentation shows:
# Assign a new param parser to a new content type
ActionController::Base.param_parsers['application/atom+xml'] =
Proc.new do |data|
node = REXML::Document.new(post)
{ node.root.name => node.root } end
Therefore, Restfulie must implement a way to enable the user to set specific media types and also support the common ones.
Rails already support XML, JSON and YAML. This feature should also include atom+xml.
Comments and changes to this ticket
-
Guilherme Silveira April 7th, 2010 @ 03:30 PM
- State changed from resolved to open
Currently not accepting requests without parameters. How to reproduce it:
rails xpto
cd xpto
script/generate controller entries
script/server
vi config/enviroment.rbconfig.gem 'restfulie', :version => '0.7'
vi app/controllers/entries_controller.rb
def index
render :text => 'hi'
end
-
Cipriani April 7th, 2010 @ 04:21 PM
- State changed from open to resolved
it's fixed. The behavior now is: every request that came with certain media type not registered in Restfulie and has entity body length greater than zero, it will generate 415 code
-
Guilherme Silveira April 8th, 2010 @ 11:22 AM
- State changed from resolved to open
It was missing a check for env["CONTENT_LENGTH"] existence.
-
Guilherme Silveira April 8th, 2010 @ 11:23 AM
- State changed from open to resolved
Simple if case added here
http://github.com/caelum/restfulie/commit/481dae05406da00dfe4b10407...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »