This project is archived and is in readonly mode.

#2793 ✓wontfix
Cody Caughlan

Bundled Rack tries to call 'split' on a Fixnum

Reported by Cody Caughlan | June 11th, 2009 @ 10:48 PM | in 2.x

In an action set a response HTTP header with a non-string value (in my case a Fixnum) but really any type that doesnt respond to 'split':

response.headers['Expires'] = 0

Throws this stack:

Thu Jun 11 14:33:56 -0700 2009: Read error: #<NoMethodError: private method split' called for 0:Fixnum><br/> /usr/local/ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/handler/mongrel.rb:66:inprocess' /usr/local/ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/handler/mongrel.rb:65:in each' /usr/local/ruby187/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack/handler/mongrel.rb:65:inprocess'

A user code fix is to just use a string value:

response.headers['Expires'] = '0'

But we can probably assume other users would be silly like me. Attached is a small patch.

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=""></a>