Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 8956 invoked from network); 22 Aug 2007 13:44:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Aug 2007 13:44:54 -0000 Received: (qmail 37313 invoked by uid 500); 22 Aug 2007 13:44:46 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 37271 invoked by uid 500); 22 Aug 2007 13:44:46 -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 37260 invoked by uid 99); 22 Aug 2007 13:44:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2007 06:44:46 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [72.22.94.67] (HELO virtual.halosg.com) (72.22.94.67) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2007 13:44:44 +0000 Received: (qmail 9485 invoked from network); 22 Aug 2007 08:37:30 -0500 Received: from 72-19-171-38.static.mesanetworks.net (HELO ?192.168.3.103?) (72.19.171.38) by halosg.com with SMTP; 22 Aug 2007 08:37:30 -0500 Message-ID: <46CC3DB6.4090904@hanik.com> Date: Wed, 22 Aug 2007 07:44:22 -0600 From: Filip Hanik - Dev Lists User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: Bug in B2C converter WAS: svn commit: r568307 - /tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java References: <20070821221541.7FD151A981A@eris.apache.org> <46CB7531.1040004@hanik.com> <46CB7F51.1030201@apache.org> <46CC3794.3080407@hanik.com> <46CC3B0A.6090108@apache.org> In-Reply-To: <46CC3B0A.6090108@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Remy Maucherat wrote: > Filip Hanik - Dev Lists wrote: >> and so the pissing contest begins, just in a different area. >> >> ok, the so the only thing required for the fix is >> 1. available() call on the intermediate stream >> 2. make sure the B2CConverter uses while(available) instead of >> while(true) >> here is the 5.5 patch (had you actually taken a look at it) >> http://people.apache.org/~fhanik/tomcat/b2c/patch.txt >> >> nothing in there is 1.5-ish, hence I don't see your veto justified. >> if you want to veto it, you have to come up with a reason why this >> patch (see url) doesn't work >> and possibly a different fix, since its a significant bug, and we are >> tagging 5.5.25 on Friday > > You do not seem to be able to read posts from other people. He does > not want NIO stuff in that branch, as it is used by other Tomcat > versions. This is a technical objection, so it is a valid veto. Where is the NIO stuff in the patch below, I've must have turned into a complete idiot, cause I can't see it. http://people.apache.org/~fhanik/tomcat/b2c/patch.txt Am I really the one not reading posts correctly? > > If you'd like to revert and patch using simply this, then most likely > he would be happy: > Index: util/java/org/apache/tomcat/util/buf/B2CConverter.java > =================================================================== > --- util/java/org/apache/tomcat/util/buf/B2CConverter.java > (revision 568320) > +++ util/java/org/apache/tomcat/util/buf/B2CConverter.java (working > copy) > @@ -82,7 +82,7 @@ > { > try { > // read from the reader > - while( true ) { // conv.ready() ) { > + while( iis.available()>0 ) { // conv.ready() ) { > int cnt=conv.read( result, 0, BUFFER_SIZE ); > if( cnt <= 0 ) { > // End of stream ! - we may be in a bad state > @@ -251,7 +251,12 @@ > public final int read() throws IOException { > return (pos < end ) ? (buf[pos++] & 0xff) : -1; > } > + > + public int available() throws IOException { > + return end-pos; > + } > > + > // -------------------- Internal methods -------------------- > > void setBuffer( byte b[], int p, int l ) { > > R�my > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org