Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast status to Integer before comparison #123

Closed
wants to merge 1 commit into from
Closed

Conversation

jcoene
Copy link

@jcoene jcoene commented Jul 19, 2012

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

2012-07-19 13:14:48 +0000: Read error: #<ArgumentError: comparison of String with 200 failed>
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.

@travisbot
Copy link

This pull request fails (merged 0531b9c into ca21111).

@evanphx evanphx closed this in 55a4753 Jul 19, 2012
aleksei-burlakov pushed a commit to aleksei-burlakov/puma that referenced this pull request Sep 6, 2022
Use rspec-retry to work around sporadic OS X test failures (fixes puma#65)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants