durusmail: qp: Patch - chunked and compressed file streams
Patch - chunked and compressed file streams
2007-09-24
2007-09-24
2007-09-24
Patch - chunked and compressed file streams
Peter Wilkinson
2007-09-24
On 25/09/2007, at 1:19 AM, David Binger wrote:

> It does to me.

Great. Does it seem reasonable to have it be the default when
appropriate rather than needing to pass in options to StaticFile or
StaticDirectory? Something like:

if stream
        if contenttype not in gzip exclude list
                compress = True
                chunked = True


Either that or a config option that turns it on for a site.

Chunked without compress is less likely to be used but I in the past
I have had a need to dribble content out (actually using Quixote)
which is a bit hard not knowing the final content length but would be
straight forward with a Stream subclass that does its work in next().

Peter W.




reply