Since upgrading to Rails 3.1 I'm seeing this warning message in my development log:
WARN Could not determine content-length of response body. Set content-length of the response or set
Response#chunked = true
What does this mean and how can I remove it? Is it a problem?
Asked the same question to one of Rails-Core's members:
https://twitter.com/luislavena/status/108998968859566080
And the answer:
https://twitter.com/tenderlove/status/108999110136303617
ya, it's fine. Need to clean it up, but nothing is being hurt.
The following patch solved the problem in my case; no more warnings for me.
204_304_keep_alive.patch
Just edit the file httpresponse.rb at line 205 as shown at the link above; in fact the link shows a correction made to a future release of Ruby.
I'm using rails 3.2.0 on ruby 1.9.3-p0 installed through RVM as a single user. So the location in my case is:
~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpresponse.rb
The location of the file to be altered differs depending on the type of installation, RVM or not, or even multi-user or single user, so I'm just giving the last part of it:
.../ruby-1.9.3-p0/lib/ruby/1.9.1/webrick/httpresponse.rb
I hope this can be helpful to someone.
EDIT: This is the link to the commit that altered the line in question in the trunk branch of ruby project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With