From: billbarker Date: Sun, 20 May 2007 22:28:47 +0000 (+0000) Subject: Always reset the MB when doing getBytes X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d9a026b0989bad14ddab4a75907f18d1e0d6842e;p=tomcat7.0 Always reset the MB when doing getBytes Fix for bug #36155 1) an unconditional reset is cheap if I'm going to call MB.setBytes 2) the JK connector doesn't support any charset except iso-latin-1 anyway 3) This particular connector is on the fast track to deprecated git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@539971 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jk/common/MsgAjp.java b/java/org/apache/jk/common/MsgAjp.java index f9fcf3cd2..dd602dcc1 100644 --- a/java/org/apache/jk/common/MsgAjp.java +++ b/java/org/apache/jk/common/MsgAjp.java @@ -237,8 +237,8 @@ public class MsgAjp extends Msg { public void getBytes(MessageBytes mb) { int length = getInt(); + mb.recycle(); if( (length == 0xFFFF) || (length == -1) ) { - mb.recycle(); return; } mb.setBytes( buf, pos, length );