Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 52206 invoked from network); 10 Aug 2004 22:41:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Aug 2004 22:41:40 -0000 Received: (qmail 20796 invoked by uid 500); 10 Aug 2004 22:41:29 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 20757 invoked by uid 500); 10 Aug 2004 22:41:29 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 20744 invoked by uid 99); 10 Aug 2004 22:41:29 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.0.86.70] (HELO victor.wilshire.com) (209.0.86.70) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 10 Aug 2004 15:41:26 -0700 Received: from thunderbird.wilshire.com (thunderbird.wilshire.com [192.168.14.20]) by victor.wilshire.com (8.12.3/8.12.3/Debian-6.6) with ESMTP id i7AMfNfF008757 for ; Tue, 10 Aug 2004 15:41:23 -0700 Received: from bbarkerxp (foundry.wilshire.com [192.168.1.129]) by thunderbird.wilshire.com (8.12.10/8.12.9) with SMTP id i7AMfCfR016819 for ; Tue, 10 Aug 2004 15:41:22 -0700 (PDT) Message-ID: <018301c47f2b$3b381930$6c37a8c0@bbarkerxp> From: "Bill Barker" To: "Tomcat Developers List" References: <07C9CCAA-EB1D-11D8-98EB-000A95774AC8@aps.org> Subject: Re: Tomcat 5; can't set response bufferSize < 8K Date: Tue, 10 Aug 2004 15:41:42 -0700 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1092177683-6406-9" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Scanned-By: MIMEDefang 2.38 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------------=_1092177683-6406-9 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Sets the preferred buffer size for the body of the response. The servlet container will use a buffer at least as large as the size requested. The actual buffer size used can be found using getBufferSize. ----- Original Message ----- From: "Lenny Marks" To: Sent: Tuesday, August 10, 2004 3:31 PM Subject: Tomcat 5; can't set response bufferSize < 8K > It seams it is impossible to set the response buffer > size(response.setBufferSize) with anything less than 8K. That is, > response.getBufferSize() still returns 8K. Anything over 8K does work. > I downloaded the source and pinned it down to the following: > > In org.apache.coyote.tomcat5.CoyoteResponse an outputBuffer is > initialized with 'new OutputBuffer()'. The default constructor of > OutputBuffer then internally creates a new ByteChunk with a 'limit' of > DEFAULT_BUFFER_SIZE, which is 8K. > > In CoyoteResponse setBufferSize is: > > public void setBufferSize(int size) { > > if (isCommitted() || !outputBuffer.isNew()) > throw new IllegalStateException > (sm.getString("coyoteResponse.setBufferSize.ise")); > > outputBuffer.setBufferSize(size); > } > > and OutputBuffer.setBufferSize is: > > public void setBufferSize(int size) { > if (size > bb.getLimit()) {// ?????? > bb.setLimit(size); > } > } > > The result is that the buffer size can never be set less than > OutputBuffer.DEFAULT_BUFFER_SIZE or 8K. > > Is there any good reason for this? The question marks make me wonder. > For now I just changed the DEFAULT_BUFFER_SIZE to 1K. Also, I'm not > sure how this is related to bufferSize and socketBuffer for the HTTP1.1 > Connector. I sounds like bufferSize is related to reading the request. > Should it be that socketBuffer is the default bufferSize for a response? > > BTW, I had done a lot of searching on this issue. I didn't find any > related bugs or postings on the Tomcat mailing lists. I had come across > one or two postings on various other lists from people having the same > problem, but the threads were never answered. I myself, am new to this > list. > > Thanks in advance for any advice, > -lenny > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org > ------------=_1092177683-6406-9 Content-Type: text/plain; name="disclaimer.txt" Content-Disposition: inline; filename="disclaimer.txt" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.411 (Entity 5.404) This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. ------------=_1092177683-6406-9 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org ------------=_1092177683-6406-9--