I ran into this issue using the Rack::ContentLength middleware with Rails 4.1.5. The middleware checks body.respond_to?(:to_ary) before calculating the Content-Length header. This fails if the body is a Rack::BodyProxy. The line has been added in 5b251a9 to fix #419 . Is there another solution for 419 or should the middleware be changed? It seems there is also no spec for this.