What does “WARN Could not determine content-length of response body.” mean and how to I get rid of it?

前端 未结 9 2668
离开以前
离开以前 2020-11-27 09:35

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 co

9条回答
  •  萌比男神i
    2020-11-27 10:04

    Add

    config.middleware.use Rack::ContentLength
    

    to your application.rb file, and the warning will disappear even with webrick. This will also set Content-Length properly in production when rendering a json or text response.

提交回复
热议问题