[PATCH] Really fix http headers for web UI and issue 254

Bryan O'Sullivan bos at serpentine.com
Tue Jun 27 22:11:39 CDT 2006


On Tue, 2006-06-27 at 12:22 -0700, Eric Hopper wrote:

> You know, I think I'm just going to have to use util.chunkbuffer for all
> of this to make the incoming bunch of pieces from the template look like
> a file so I can use mimetools.Message to extract the header from it.

Why not bite the bullet and implement HTTP/1.1 chunked transfer encoding
instead?  It's crying out to be used for e.g. changegroups, anyway, so
that keepalive can always work.

> On the plus side, this means I can perhaps just buffer up the whole page
> before sending it out, which means I can get a content-length.  Does
> anybody think this is an awful idea?

If you do the chunked transfer encoding, you won't need to buffer the
whole page, which will do wonder for scalability.

>   It may cause problems with large
> diffs.  But right now the template code returns a whole mass of
> recursively nested generators and stuff.  I have no idea if those diffs
> are effectively buffered right now or not.

They are.  The doodad that walks them recursively uses whatever
buffering the underlying file object supports.

	<b



More information about the Mercurial mailing list