puma/puma — pull request #123 by jcoene (2012-07-19 13:42:56+00:00)
Title: Cast status to Integer before comparison

I've been seeing the following error (resulting in an upstream 503):

2012-07-19 13:14:48 +0000: Read error: #
vendor/bundle/ruby/1.9.1/gems/puma-1.4.0/lib/puma/server.rb:480:in `<'
vendor/bundle/ruby/1.9.1/gems/puma-1.4.0/lib/puma/server.rb:480:in `handle_request'
vendor/bundle/ruby/1.9.1/gems/puma-1.4.0/lib/puma/server.rb:288:in `process_client'
vendor/bundle/ruby/1.9.1/gems/puma-1.4.0/lib/puma/server.rb:197:in `block in run'
vendor/bundle/ruby/1.9.1/gems/puma-1.4.0/lib/puma/thread_pool.rb:92:in `call'
vendor/bundle/ruby/1.9.1/gems/puma-1.4.0/lib/puma/thread_pool.rb:92:in `block in spawn_thread'

It looks like Puma is receiving a String for status. I can imagine this isn't the desired behavior but haven't been able to discover the cause of problem. I'm using rails 3.2.6 and rack 1.4.1.

Other web servers don't choke on the String. I've included my crude fix.