
On Sat, 14 Nov 2015 at 17:45 Cory Benfield <cory@lukasa.co.uk> wrote:
A similar approach should be taken with sending data: we should assume that users want to chunk it if they do not provide a content-length. An extreme position to take (and I do) is that this should be sufficiently easy that most users actually *accidentally* end up chunking their data: that is, we do not provide special helpers to set content-length, instead just checking whether that’s a header users actually send, and if they don’t we chunk the data.
As far as I know, this is exactly what is done in the existing HTTP/1.x implementation: if a Content-Length header field is not set before data is written to the request object (as it is called), chunked transfer encoding is automatically used for the response. This behaviour is required by HTTP/1.1.