Apparently both Rack::CommonLogger middleware and WEBrick are issuing logging information and WEBrick complains when we send a zero sized response body (which happens when some content is cached like assets and a 304 is returned):
$ bundle exec harbor server
WARNING: Locales are not fully supported on MRI yet
[2012-04-30 00:24:36] INFO WEBrick 1.3.1
[2012-04-30 00:24:36] INFO ruby 1.9.3 (2012-02-16) [x86_64-linux]
[2012-04-30 00:24:36] WARN TCPServer Error: Address already in use - bind(2)
[2012-04-30 00:24:36] INFO WEBrick::HTTPServer#start: pid=30657 port=9292
127.0.0.1 - - [30/Apr/2012 00:24:39] "GET / HTTP/1.1" 200 3328 0.0416
localhost - - [30/Apr/2012:00:24:39 BRT] "GET / HTTP/1.1" 200 3328
- -> /
127.0.0.1 - - [30/Apr/2012 00:24:39] "GET /assets/stylesheets/bootstrap.min.css HTTP/1.1" 304 - 0.0008
[2012-04-30 00:24:39] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
localhost - - [30/Apr/2012:00:24:39 BRT] "GET /assets/stylesheets/bootstrap.min.css HTTP/1.1" 304 0
http://localhost:9292/ -> /assets/stylesheets/bootstrap.min.css
127.0.0.1 - - [30/Apr/2012 00:24:39] "GET /assets/stylesheets/bootstrap-responsive.min.css HTTP/1.1" 304 - 0.0007
[2012-04-30 00:24:39] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
localhost - - [30/Apr/2012:00:24:39 BRT] "GET /assets/stylesheets/bootstrap-responsive.min.css HTTP/1.1" 304 0
http://localhost:9292/ -> /assets/stylesheets/bootstrap-responsive.min.css
127.0.0.1 - - [30/Apr/2012 00:24:39] "GET /assets/stylesheets/closet.css HTTP/1.1" 304 - 0.0007
[2012-04-30 00:24:39] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
localhost - - [30/Apr/2012:00:24:39 BRT] "GET /assets/stylesheets/closet.css HTTP/1.1" 304 0
http://localhost:9292/ -> /assets/stylesheets/closet.css
127.0.0.1 - - [30/Apr/2012 00:24:39] "GET /assets/javascripts/jquery-ui-1.8.19.custom.min.js HTTP/1.1" 304 - 0.0007
[2012-04-30 00:24:39] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
localhost - - [30/Apr/2012:00:24:39 BRT] "GET /assets/javascripts/jquery-ui-1.8.19.custom.min.js HTTP/1.1" 304 0
http://localhost:9292/ -> /assets/javascripts/jquery-ui-1.8.19.custom.min.js
127.0.0.1 - - [30/Apr/2012 00:24:39] "GET /assets/javascripts/jquery-1.7.2.min.js HTTP/1.1" 304 - 0.0007
[2012-04-30 00:24:39] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
localhost - - [30/Apr/2012:00:24:39 BRT] "GET /assets/javascripts/jquery-1.7.2.min.js HTTP/1.1" 304 0
http://localhost:9292/ -> /assets/javascripts/jquery-1.7.2.min.js
The WEBrick WARN is a known issue on MRI 1.9.3, but the duplicated log messages is probably something we can avoid.
The weird thing is that running just bundle exec rackup does not issue those duplicated messages:
Apparently both Rack::CommonLogger middleware and WEBrick are issuing logging information and WEBrick complains when we send a zero sized response body (which happens when some content is cached like assets and a 304 is returned):
The WEBrick WARN is a known issue on MRI 1.9.3, but the duplicated log messages is probably something we can avoid.
The weird thing is that running just
bundle exec rackup
does not issue those duplicated messages: