Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixed Rack::ContentLength#call don't set Content-Length #284

wants to merge 1 commit into


None yet
2 participants

Rack::ContentLength#call don't set Content-Length when body is a instance of Rack::Response.

Is this intended behavior?


raggi commented Dec 17, 2011

I have mixed feelings. I want to discourage use of the ContentLength middleware. You're better off streaming where possible, and using the chunking middleware.

Thanks for reply :)

Ah, I see. But, rack-1.3's Rack::ContentLength is able to set Content-Length for Rack::Response. I think almost users need they are same behavior.


raggi commented Nov 3, 2012

Closing this out, as it's effectively applied in 1.4, but through a slightly different approach.

The to_str branch does not exist, as it's not appropriate per SPEC.

Thank you!

@raggi raggi closed this Nov 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment