The following patch combines the 3 packets that were generated for each chunk into just one packet. There are more optimizations elsewhere - I'll keep looking.
Patch of org.apache.coyote.http11.filters.ChunkedOutputFilter from 4.1.27 src. --- ChunkedOutputFilter.java.orig 2003-07-31 19:29:00.000000000 -0400 +++ ChunkedOutputFilter.java 2003-09-11 12:17:27.804922300 -0400 @@ -129,9 +129,10 @@ /** - * Chunk header. + * Chunk used to buffer header, data, and end chunk for one write. + * Initial size of 1500 is Maximum Transmission Unit size for Ethernet and PPP. */ - protected ByteChunk chunkHeader = new ByteChunk(); + protected ByteChunk chunkBuffer = new ByteChunk(1500); // ------------------------------------------------------------- Properties @@ -162,16 +163,14 @@ current = current / 16; chunkLength[pos--] = HexUtils.HEX[digit]; } - chunkHeader.setBytes(chunkLength, pos + 1, 9 - pos); - buffer.doWrite(chunkHeader, res); - buffer.doWrite(chunk, res); - - chunkHeader.setBytes(chunkLength, 8, 2); - buffer.doWrite(chunkHeader, res); + chunkBuffer.recycle(); + chunkBuffer.append(chunkLength, pos + 1, 9 - pos); + chunkBuffer.append(chunk); + chunkBuffer.append(chunkLength, 8, 2); + buffer.doWrite(chunkBuffer, res); return result; - } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]