httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject chunked write discussion
Date Sat, 25 Jan 1997 22:10:10 GMT
While bcwrite() with my patch is more correct it's certainly not
efficient.  It causes 3 segments to be plopped on the net for each chunk. 
The simple fix for this is to allocate a buffer in bcwrite() and copy the
stuff to be written into it and then do a single write().  But this
involves an extra copy... something that'd be nice to avoid. 

My first idea was to fix it by using writev(), but writev() on linux (but
not IRIX or Solaris) drops a segment on the wire for each vector element.

Then my next idea was to fix it by overallocating the buffer so that it
has room at the beginning for the chunk header and at the end for the
chunk tail.  Then I read the HTTP/1.1 standard and found out that chunk
sizes cannot start with extra 0 digits (BOO HISS!).  It's still not hard
to do it this way. 

Then I finally realised that if we're doing stacked disciplines for 2.0
then we're going to have that extra buffer copy anyhow.  So, should I
submit a patch that implements the first method (buffer copy) or the third
method (overallocated buffer)?

I'm not trying to get this in for 1.2b5 or even 1.2 for that matter.   I
don't even know how to test chunked encodings, is there a client that
supports it?


View raw message