Francois Beausoleil
2006-Jun-28 07:54 UTC
RawPostDataTest#test_put_with_empty_content_type_ignores_body failure
Hi ! I get a failure for RawPostDataTest#test_put_with_empty_content_type_ignores_body at r4498: 2) Error: test_put_with_empty_content_type_ignores_body(RawPostDataTest): NoMethodError: undefined method `downcase' for nil:NilClass ./test/controller/../../lib/action_controller/cgi_ext/raw_post_data_fix.rb:39:in `initialize_query' C:/ruby/lib/ruby/1.8/cgi.rb:2270:in `initialize' ./test/controller/raw_post_test.rb:58:in `cgi_params' ./test/controller/raw_post_test.rb:43:in `test_put_with_empty_content_type_ignores_body' If we look here, we see the Content-Type header is corrected for POST requests: http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb#L17 Should we correct PUT requests too, or is it better to not assume the value and correctly implement the test ? I'm on Win32, if that makes any difference. Thanks ! -- François Beausoleil http://blog.teksol.info/ _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Mislav Marohnić
2006-Jun-28 13:37 UTC
Re: RawPostDataTest#test_put_with_empty_content_type_ignores_body failure
This has been like this for quite some time now on Win32. The problem is that, when you save an empty string into an ENV variable, it is later returned as nil. Since the whole core team is on OS X they don''t experience this and therefore it was never fixed. 4 weeks ago I submitted a patch for this in ticket #5276 < http://dev.rubyonrails.org/ticket/5276> The patch is simple, it just adds checking for nil in a certain condition that previously assumed a value is a string. On 6/28/06, Francois Beausoleil <francois.beausoleil@gmail.com> wrote:> > Hi ! > > I get a failure for > RawPostDataTest#test_put_with_empty_content_type_ignores_body at_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Marcel Molina Jr.
2006-Jun-28 13:51 UTC
Re: RawPostDataTest#test_put_with_empty_content_type_ignores_body failure
On Wed, Jun 28, 2006 at 03:37:38PM +0200, Mislav Marohni?? wrote:> This has been like this for quite some time now on Win32. The problem is > that, when you save an empty string into an ENV variable, it is later > returned as nil. Since the whole core team is on OS X they don''t > experience this and therefore it was never fixed. > > 4 weeks ago I submitted a patch for this in ticket #5276 > <http://dev.rubyonrails.org/ticket/5276> > > The patch is simple, it just adds checking for nil in a certain condition > that previously assumed a value is a string.Applied. Thanks for the fix. marcel -- Marcel Molina Jr. <marcel@vernix.org>