tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r467599 - in /tomcat/tc6.0.x/trunk/java/org/apache/jk: common/ChannelSocket.java common/JkInputStream.java core/JkHandler.java core/MsgContext.java
Date Wed, 25 Oct 2006 10:18:03 GMT
Author: jfclere
Date: Wed Oct 25 03:18:02 2006
New Revision: 467599

URL: http://svn.apache.org/viewvc?view=rev&rev=467599
Log:
Allow variable size of AJP message via packetSize=n in <Connector/>.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelSocket.java
    tomcat/tc6.0.x/trunk/java/org/apache/jk/common/JkInputStream.java
    tomcat/tc6.0.x/trunk/java/org/apache/jk/core/JkHandler.java
    tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelSocket.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelSocket.java?view=diff&rev=467599&r1=467598&r2=467599
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelSocket.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jk/common/ChannelSocket.java Wed Oct 25 03:18:02
2006
@@ -654,7 +654,7 @@
             log.debug("Accepting ajp connections on " + port);
         while( running ) {
 	    try{
-                MsgContext ep=createMsgContext();
+                MsgContext ep=createMsgContext(packetSize);
                 ep.setSource(this);
                 ep.setWorkerEnv( wEnv );
                 this.accept(ep);

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jk/common/JkInputStream.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jk/common/JkInputStream.java?view=diff&rev=467599&r1=467598&r2=467599
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jk/common/JkInputStream.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jk/common/JkInputStream.java Wed Oct 25 03:18:02
2006
@@ -39,8 +39,8 @@
     private static org.apache.juli.logging.Log log=
         org.apache.juli.logging.LogFactory.getLog( JkInputStream.class );
 
-    private Msg bodyMsg = new MsgAjp();
-    private Msg outputMsg = new MsgAjp();
+    private Msg bodyMsg;
+    private Msg outputMsg;
     private MsgContext mc;
 
     
@@ -62,8 +62,16 @@
         }
     }
 
-    public JkInputStream(MsgContext context) {
+    public JkInputStream(MsgContext context, int bsize) {
         mc = context;
+        bodyMsg = new MsgAjp(bsize);
+        outputMsg = new MsgAjp(bsize);
+    }
+    /**
+     * @deprecated
+     */
+    public JkInputStream(MsgContext context) {
+        this(context, 8*1024);
     }
 
     // -------------------- Jk specific methods --------------------

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jk/core/JkHandler.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jk/core/JkHandler.java?view=diff&rev=467599&r1=467598&r2=467599
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jk/core/JkHandler.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jk/core/JkHandler.java Wed Oct 25 03:18:02 2006
@@ -111,9 +111,13 @@
     }
 
     public MsgContext createMsgContext() {
-        return new MsgContext();
+        return new MsgContext(8*1024);
     }
     
+    public MsgContext createMsgContext(int bsize) {
+        return new MsgContext(bsize);
+    }
+
     public int invoke(Msg msg, MsgContext mc )  throws IOException {
         return OK;
     }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java?view=diff&rev=467599&r1=467598&r2=467599
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jk/core/MsgContext.java Wed Oct 25 03:18:02 2006
@@ -53,7 +53,7 @@
     private Object notes[]=new Object[32];
     private JkHandler next;
     private JkChannel source;
-    private JkInputStream jkIS = new JkInputStream(this);
+    private JkInputStream jkIS;
     private C2BConverter c2b;
     private Request req;
     private WorkerEnv wEnv;
@@ -80,12 +80,19 @@
     public static final int JK_STATUS_CLOSED=2;
     public static final int JK_STATUS_ERROR=3;
 
-    public MsgContext() {
+    public MsgContext(int bsize) {
         try {
             c2b = new C2BConverter("iso-8859-1");
         } catch(IOException iex) {
             log.warn("Can't happen", iex);
         }
+        jkIS = new JkInputStream(this, bsize);
+    }
+    /**
+     * @deprecated
+     */
+    public MsgContext() {
+        this(8*1024);
     }
     
     public final Object getNote( int id ) {



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


Mime
View raw message