tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject svn commit: r539971 - /tomcat/tc6.0.x/trunk/java/org/apache/jk/common/MsgAjp.java
Date Sun, 20 May 2007 22:28:51 GMT
Author: billbarker
Date: Sun May 20 15:28:47 2007
New Revision: 539971

URL: http://svn.apache.org/viewvc?view=rev&rev=539971
Log:
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

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/jk/common/MsgAjp.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jk/common/MsgAjp.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jk/common/MsgAjp.java?view=diff&rev=539971&r1=539970&r2=539971
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jk/common/MsgAjp.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jk/common/MsgAjp.java Sun May 20 15:28:47 2007
@@ -237,8 +237,8 @@
 
     public void getBytes(MessageBytes mb) {
         int length = getInt();
+        mb.recycle();
         if( (length == 0xFFFF) || (length == -1) ) {
-            mb.recycle();
             return;
         }
         mb.setBytes( buf, pos, length );



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message