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 127.0.0.1 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/server.rb:183:in `block in start_thread'
each' for "SOMEREVISIONNUMBERHERE\n":String
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!
Always return a Rack body that has an #each method
Closes Issue #2