Request#params throws exception on POST if CONTENT_TYPE is empty
Reported by Toby Tripp | August 28th, 2010 @ 05:50 PM
Stacktrace:
rack-1.2.1/lib/rack/request.rb:44:in
media_type' rack-1.2.1/lib/rack/request.rb:116:inform_data?' rack-1.2.1/lib/rack/request.rb:146:inPOST' rack-1.2.1/lib/rack/request.rb:167:in
params'
The problem appears to lie in #media_type trying to split the empty String.
I can quickly fix this myself if someone has a reasonable idea what the behavior should be. It seems to me that #form_data? should return false if CONTENT_TYPE is blank.
Comments and changes to this ticket
-
Toby Tripp August 28th, 2010 @ 07:50 PM
Actually, looking at the code for #form_data? it seems a blank CONTENT_TYPE on a POST should return true. I've attached a patch that implements this behavior.
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 ยป