Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true [duplicate]

This is a problem of Webrick. you can use "Thin" instead.

Add this to Gemfile

gem 'thin'

then rails s will use thin instead of Webrick, and the warn will disappear.


Patch mentioned by Amiel Martin works for me! Just find your webrick path (ex., c:\Ruby\lib\ruby\1.9.1\webrick\ on Windows) and change httpresponse.rb file as described in https://bugs.ruby-lang.org/attachments/2300/204_304_keep_alive.patch

And don't forget restart Webrick!


This patch for WEBrick is also reported to work:

https://bugs.ruby-lang.org/attachments/2300/204_304_keep_alive.patch