/system/revision blows up with webrick #2

pivotal-casebook opened this Issue Mar 16, 2011 · 2 comments

2 participants


Created a REVISION file with the string "SOMEREVISIONHERE" in it

$ curl http://localhost:3000/system/revision

results in a 500.

webrick log shows:

Started GET "/system/revision" for at 2011-03-16 14:50:04 -0400
[2011-03-16 14:50:05] ERROR NoMethodError: undefined method each' for "SOMEREVISIONNUMBERHERE\n":String
/Users/pivotal/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/webrick/httpserver.rb:111:in service'
/Users/pivotal/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

This does work in thin and passenger but thought I'd file it so others who run into it may know about it. Probably not worth fixing since nobody should be using webrick outside of development anyways. Feel free to close as a wontfix.


Interesting. I'm returning a string as the Rack body instead of an Array. Seems like I'm violating the Rack spec, and some servers are more lenient with me than others. Fixing now.


Fixed and released v2.1.1. Thanks!

@jamster jamster pushed a commit to jamster/ops_middleware that referenced this issue Sep 5, 2011
@brynary brynary Always return a Rack body that has an #each method
Closes Issue #2
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment