[Twisted-Python] Streaming HTTP

Tristan Seligmann mithrandi at mithrandi.net
Sat Nov 14 20:29:38 MST 2015


On Sat, 14 Nov 2015 at 17:45 Cory Benfield <cory at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20151115/732521d0/attachment-0002.html>


More information about the Twisted-Python mailing list