This project is archived and is in readonly mode.

#2497 ✓wontfix
Nate Wiger

Rack in Rails 2.3.2 throws fatal error with small uploads

Reported by Nate Wiger | April 15th, 2009 @ 12:38 AM | in 2.x

We have found a specific situation with binary multipart uploads causing Rack with Rails 2.3.2 to throw a fatal error.

The specific files we have tested shows that >= 112kb works, <= 110k fails. The error thrown up from Rack is:

/!\ FAILSAFE /!\ 2009-04-14 17:23:32 -0400 Status: 500 Internal Server Error invalid byte sequence in US-ASCII

/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/utils.rb:320:in `=~'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/utils.rb:320:in `block in parse_multipart'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/utils.rb:315:in `loop'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/utils.rb:315:in `parse_multipart'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/request.rb:125:in `POST'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/methodoverride.rb:15:in `call'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/params_parser.rb:15:in `call'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/rewindable_input.rb:25:in `call'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/session/abstract_store.rb:122:in `call'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/failsafe.rb:11:in `call'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/lock.rb:11:in `block in call'
<internal:prelude>:8:in `synchronize'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/lock.rb:11:in `call'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:106:in `call'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/cgi_process.rb:44:in `dispatch_cgi'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:102:in `dispatch_cgi'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:28:in `dispatch'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/lib/rack/adapter/rails.rb:54:in `serve_rails'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/lib/rack/adapter/rails.rb:74:in `call'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/lib/thin/connection.rb:63:in `pre_process'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/lib/thin/connection.rb:54:in `process'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/lib/thin/connection.rb:39:in `receive_data'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.6/lib/eventmachine.rb:240:in `run_machine'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.6/lib/eventmachine.rb:240:in `run'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/lib/thin/backends/base.rb:57:in `start'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/lib/thin/server.rb:150:in `start'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/lib/thin/controllers/controller.rb:80:in `start'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/lib/thin/runner.rb:173:in `run_command'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/lib/thin/runner.rb:139:in `run!'
/usr/playerconnect-stack-2009c/lib/ruby/gems/1.9.1/gems/thin-1.0.0/bin/thin:6:in `<top (required)>'
/usr/playerconnect-stack-2009c/bin/thin:19:in `load'
/usr/playerconnect-stack-2009c/bin/thin:19:in `<main>'

I have also posted this to the Rack devel list, but this specific exception is coming from Rails' bundled rack-1.0 package. The attached file fails in our tests.

Any help is MUCH appreciated.

Thanks, Nate

Comments and changes to this ticket

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>

Pages