Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BABE810613 for ; Wed, 4 Dec 2013 15:56:34 +0000 (UTC) Received: (qmail 71847 invoked by uid 500); 4 Dec 2013 15:56:33 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 71407 invoked by uid 500); 4 Dec 2013 15:56:33 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 71398 invoked by uid 99); 4 Dec 2013 15:56:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Dec 2013 15:56:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Dec 2013 15:56:30 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 7AFB61CD3D; Wed, 4 Dec 2013 15:56:09 +0000 (UTC) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: [Bug 55842] New: response.setBufferSize() does not seem to work properly Date: Wed, 04 Dec 2013 15:56:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 7 X-Bugzilla-Component: Catalina X-Bugzilla-Version: 7.0.47 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: martin.maier-moessner@oenb.at X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=55842 Bug ID: 55842 Summary: response.setBufferSize() does not seem to work properly Product: Tomcat 7 Version: 7.0.47 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: martin.maier-moessner@oenb.at I found a problem with setting the buffer size for the ServletResponse. If I call 'response.setBufferSize(1,000,000);' and send about 20,000 characters, the response will be chunked even though it should not. The response is sent in several chunks and contains the 'Transfer-Encoding: chunked' response header. In my understanding in this case the response should be fully buffered on the server and then sent as a whole containing the Content-Length-header. This causes a problem in my application because I want to use a larger buffer to be able to redirect to an error page if an error occurs during rendering the response. I was able to reproduce this on Tomcat 7.0.39, 7.0.40, 7.0.42, 7.0.47. Tomcat 7.0.37 works fine and as expected. This is easily reproducable by using a JSP as follows: <% response.setBufferSize(1000*1000); for (int i = 0; i < 100; i++) { for (int j = 0; j < 100; j++) { response.getWriter().write("X"); } response.getWriter().write("
"); } %> -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org