Currently, the limit up to which the size of an
org.apache.coyote.tomcat5.OutputBuffer may grow is identical to the
original buffer size:

public OutputBuffer(int size) {

        bb = new ByteChunk(size);
        bb.setLimit(size);
        ...
        cb = new CharChunk(size);
        cb.setLimit(size);
    }

As a result of this, if the response does not fit in the output
buffer, the buffer is flushed, and the response does no longer include
a "Content-Length" header. Instead, it includes a "Transfer-Encoding"
header whose value is "chunked":

Transfer-Encoding: chunked

It may be useful (e.g., for some benchmarks such as TPC-W) to be able
to configure a connector such that the buffer size of its responses
grows infinitely, in which case the above "setLimit" calls would not
occur and the response would always include a "Content-Length" header,
no matter how big.

I am proposing a CoyoteConnector attribute "outLimited" (I am open to other naming suggestions), whose possible values may be "TRUE" (default) or "FALSE": if "TRUE", the output buffer size limit is set to the output buffer size (current behaviour), and if "FALSE", an output buffer may grow infinitely.

Comments?


Jan



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to