Author: pero Date: Tue Dec 12 08:34:36 2006 New Revision: 486217 URL: http://svn.apache.org/viewvc?view=rev&rev=486217 Log: Add support to send and receive more the 8K BODY packets.
Modified: tomcat/connectors/trunk/jk/java/org/apache/jk/common/JkInputStream.java Modified: tomcat/connectors/trunk/jk/java/org/apache/jk/common/JkInputStream.java URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/java/org/apache/jk/common/JkInputStream.java?view=diff&rev=486217&r1=486216&r2=486217 ============================================================================== --- tomcat/connectors/trunk/jk/java/org/apache/jk/common/JkInputStream.java (original) +++ tomcat/connectors/trunk/jk/java/org/apache/jk/common/JkInputStream.java Tue Dec 12 08:34:36 2006 @@ -52,7 +52,8 @@ private boolean isFirst = true; private boolean isReplay = false; private boolean isReadRequired = false; - + private int packetSize = AjpConstants.MAX_PACKET_SIZE ; + static { // Make certain HttpMessages is loaded for SecurityManager try { @@ -64,15 +65,19 @@ public JkInputStream(MsgContext context, int bsize) { mc = context; - bodyMsg = new MsgAjp(bsize); - outputMsg = new MsgAjp(bsize); + if( bsize < AjpConstants.MAX_PACKET_SIZE) + this.packetSize = AjpConstants.MAX_PACKET_SIZE ; + else + this.packetSize = bsize ; + bodyMsg = new MsgAjp(this.packetSize); + outputMsg = new MsgAjp(this.packetSize); } /** * @deprecated */ public JkInputStream(MsgContext context) { - this(context, 8*1024); + this(context, AjpConstants.MAX_PACKET_SIZE); } // -------------------- Jk specific methods -------------------- @@ -245,7 +250,8 @@ // Why not use outBuf?? bodyMsg.reset(); bodyMsg.appendByte(AjpConstants.JK_AJP13_GET_BODY_CHUNK); - bodyMsg.appendInt(AjpConstants.MAX_READ_SIZE); + // bodyMsg.appendInt(AjpConstants.MAX_READ_SIZE); + bodyMsg.appendInt(packetSize - AjpConstants.H_SIZE -2); if( log.isDebugEnabled() ) log.debug("refillReadBuffer " + Thread.currentThread()); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]