Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 98409 invoked from network); 3 Mar 2008 21:13:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Mar 2008 21:13:41 -0000 Received: (qmail 18471 invoked by uid 500); 3 Mar 2008 21:13:33 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 18407 invoked by uid 500); 3 Mar 2008 21:13: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 18396 invoked by uid 99); 3 Mar 2008 21:13:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 13:13:33 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.97.136.133] (HELO n068.sc1.he.tucows.com) (64.97.136.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 21:12:45 +0000 Received: from sc1-out08.emaildefenseservice.com (64.97.139.2) by n068.sc1.he.tucows.com (7.2.069.1) id 4769316E00CBFFA9 for dev@tomcat.apache.org; Mon, 3 Mar 2008 21:13:05 +0000 X-SpamScore: 2 X-Spamcatcher-Summary: 2,0,0,99b59a904668b62f,788351f075fbb6c0,markt@apache.org,-,RULES_HIT:152:355:379:599:601:854:945:966:967:968:973:988:989:1187:1260:1261:1277:1311:1313:1314:1345:1358:1359:1437:1515:1516:1518:1534:1542:1593:1594:1676:1711:1730:1747:1766:1792:2196:2199:2393:2525:2553:2559:2563:2682:2685:2693:2857:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3027:3354:3865:3866:3867:3868:3869:3870:3871:3872:3873:3874:3934:3936:3938:3941:3944:4321:4385:4605:5007:6120:6248: 7652:7679:7875,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:none,DNSBL:none X-Spamcatcher-Explanation: Received: from [192.168.0.100] (unknown [91.109.133.131]) (Authenticated sender: med.thomas) by sc1-out08.emaildefenseservice.com (Postfix) with ESMTP for ; Mon, 3 Mar 2008 21:13:04 +0000 (UTC) Message-ID: <47CC69DF.1080305@apache.org> Date: Mon, 03 Mar 2008 21:13:03 +0000 From: Mark Thomas User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) 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> <47C5BF24.1020504@hanik.com> <1204150821.3333.5.camel@localhost.localdomain> <47C5EC61.1050005@hanik.com> <1204155961.3333.27.camel@localhost.localdomain> <47C5FB7C.5070001@hanik.com> <1204159001.3333.38.camel@localhost.localdomain> <1204213503.3298.20.camel@localhost.localdomain> <47C70D5B.8020904@apache.org> <47C73110.3060406@hanik.com> In-Reply-To: <47C73110.3060406@hanik.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Filip Hanik - Dev Lists wrote: > Mark Thomas wrote: >> Remy Maucherat wrote: >>> On Thu, 2008-02-28 at 01:36 +0100, Remy Maucherat wrote: >>>> Index: java/org/apache/catalina/connector/InputBuffer.java >>>> =================================================================== >>>> ---java/org/apache/catalina/connector/InputBuffer.java (revision >>>> 630535) >>>> +++java/org/apache/catalina/connector/InputBuffer.java (working >>>> copy) >>>> @@ -355,7 +355,7 @@ >>>> } >>>> >>>> state = CHAR_STATE; >>>> - conv.convert(bb, cb, len); >>>> + conv.convert(bb, cb, bb.getLength()); >>>> bb.setOffset(bb.getEnd()); >>>> >>>> return cb.getLength(); >>> >>> This seems to work for me. It should be equivalent to the value returned >>> by the available method, since the value passed is the same (it is the >>> amount of bytes which have been read). >> >> Just to be clear, do you mean that the above patch >> http://issues.apache.org/bugzilla/show_bug.cgi?id=44494 ? > that's correct > Filip First off - sorry it has taken me a few days to reply. Secondly, I still haven't had enough time to look at this in detail so my reasoning may be way off base. It it is, I apologise - feel free to correct me with or without flames. Looking through the InputBuffer code, realReadBytes(), realReadChars() and realWriteChars() all ignore the parameters passed in with the exception of len in realReadChars() which the patch above changes so it too is ignored. It appears to me that all of these methods need to be modified not to take any parameters since they all operate on the internal buffers rather than the ones passed to them (a job for another day). On this basis, the patch above patch strikes me as the right way forward rather than the one currently applied to trunk. On the basis of the above, I would vote -0 for the current patch since I don't think I have done enough research to vote -1 or +1. However, since the current patch removes a method from a public API I will be voting -1 solely on that basis. Once that is fixed, I'll change my vote to -0 until I have a change to look at this some more (hopefully in the next week or so). Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org