tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hgo...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33 Ajp14Interceptor.java
Date Thu, 16 Oct 2003 07:37:33 GMT
hgomez      2003/10/16 00:37:32

  Modified:    jk/java/org/apache/jk/common HandlerRequest.java
               jk/java/org/apache/ajp Ajp13.java RequestHandler.java
               jk/java/org/apache/ajp/tomcat33 Ajp14Interceptor.java
  Log:
  My latest patches to jk/ajp broke the AJP14 logon phase since I was 
  using the PING message which ask container to take control for
  PING/PONG control.
  Created CPING/CPONG message instead ...
  
  
  
  Revision  Changes    Path
  1.28      +7 -6      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java
  
  Index: HandlerRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- HandlerRequest.java	30 Sep 2003 07:39:58 -0000	1.27
  +++ HandlerRequest.java	16 Oct 2003 07:37:32 -0000	1.28
  @@ -111,13 +111,14 @@
       public static final byte JK_AJP13_FORWARD_REQUEST   = 2;
   	public static final byte JK_AJP13_SHUTDOWN          = 7;
   	public static final byte JK_AJP13_PING_REQUEST      = 8;
  +	public static final byte JK_AJP13_CPING_REQUEST     = 10;
   
       // Prefix codes for message types from container to server
       public static final byte JK_AJP13_SEND_BODY_CHUNK   = 3;
       public static final byte JK_AJP13_SEND_HEADERS      = 4;
       public static final byte JK_AJP13_END_RESPONSE      = 5;
   	public static final byte JK_AJP13_GET_BODY_CHUNK    = 6;
  -	public static final byte JK_AJP13_PONG_REPLY        = 9;
  +	public static final byte JK_AJP13_CPONG_REPLY       = 9;
       
       // Integer codes for common response header strings
       public static final int SC_RESP_CONTENT_TYPE        = 0xA001;
  @@ -238,9 +239,9 @@
                                             "JK_AJP13_SHUTDOWN",
                                             this, null); // 7
               
  -			dispatch.registerMessageType( JK_AJP13_PING_REQUEST,
  -										  "JK_AJP13_PING_REQUEST",
  -										  this, null); // 8
  +			dispatch.registerMessageType( JK_AJP13_CPING_REQUEST,
  +										  "JK_AJP13_CPING_REQUEST",
  +										  this, null); // 10
               
               // register outgoing messages handler
               dispatch.registerMessageType( JK_AJP13_SEND_BODY_CHUNK, // 3
  @@ -424,9 +425,9 @@
   	    return OK;
   
   		// We got a PING REQUEST, quickly respond with a PONG
  -		case JK_AJP13_PING_REQUEST:
  +		case JK_AJP13_CPING_REQUEST:
   			msg.reset();
  -			msg.appendByte(JK_AJP13_PONG_REPLY);
  +			msg.appendByte(JK_AJP13_CPONG_REPLY);
   			ep.setType( JkHandler.HANDLE_SEND_PACKET );
   			ep.getSource().invoke( msg, ep );
   			
  
  
  
  1.27      +2 -2      jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp13.java
  
  Index: Ajp13.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/Ajp13.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Ajp13.java	25 Sep 2003 15:24:44 -0000	1.26
  +++ Ajp13.java	16 Oct 2003 07:37:32 -0000	1.27
  @@ -307,8 +307,8 @@
   	case RequestHandler.JK_AJP13_FORWARD_REQUEST:
   	    return reqHandler.decodeRequest(this, hBuf, req);
   	    
  -	case RequestHandler.JK_AJP13_PING_REQUEST:
  -		return reqHandler.sendPong(this, outBuf);
  +	case RequestHandler.JK_AJP13_CPING_REQUEST:
  +		return reqHandler.sendCPong(this, outBuf);
   		
   	case RequestHandler.JK_AJP13_SHUTDOWN:
   	    return -2;
  
  
  
  1.19      +8 -7      jakarta-tomcat-connectors/jk/java/org/apache/ajp/RequestHandler.java
  
  Index: RequestHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/RequestHandler.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- RequestHandler.java	25 Sep 2003 15:24:44 -0000	1.18
  +++ RequestHandler.java	16 Oct 2003 07:37:32 -0000	1.19
  @@ -99,13 +99,14 @@
   	public static final byte JK_AJP13_FORWARD_REQUEST   = 2;
   	public static final byte JK_AJP13_SHUTDOWN          = 7;
   	public static final byte JK_AJP13_PING_REQUEST      = 8;    
  +	public static final byte JK_AJP13_CPING_REQUEST     = 10;    
   
       // Prefix codes for message types from container to server
       public static final byte JK_AJP13_SEND_BODY_CHUNK   = 3;
       public static final byte JK_AJP13_SEND_HEADERS      = 4;
       public static final byte JK_AJP13_END_RESPONSE      = 5;
   	public static final byte JK_AJP13_GET_BODY_CHUNK    = 6;
  -	public static final byte JK_AJP13_PONG_REPLY        = 9;
  +	public static final byte JK_AJP13_CPONG_REPLY       = 9;
   	
       // Integer codes for common response header strings
       public static final int SC_RESP_CONTENT_TYPE        = 0xA001;
  @@ -226,24 +227,24 @@
   	ajp14.registerMessageType( JK_AJP13_GET_BODY_CHUNK, // 6
   				   "JK_AJP13_GET_BODY_CHUNK",
   				   this, null );
  -	ajp14.registerMessageType( JK_AJP13_PING_REQUEST,
  +	ajp14.registerMessageType( JK_AJP13_CPING_REQUEST,
   				   "JK_AJP13_PING_REQUEST",
  -				   this, null); // 8
  -	ajp14.registerMessageType( JK_AJP13_PONG_REPLY,
  +				   this, null); // 10
  +	ajp14.registerMessageType( JK_AJP13_CPONG_REPLY,
   				   "JK_AJP13_PONG_REPLY",
   				   this, null); // 9
       }
       
       /**
  -     * Send a PONG REPLY to web server to its PING request
  +     * Send a CPONG REPLY to web server to its CPING request
        * 
        * @param ch the Ajp13 channel
        * @param outBuf the Ajp13Packet output packet to use
        */
  -    public int sendPong(Ajp13 ch, Ajp13Packet outBuf)
  +    public int sendCPong(Ajp13 ch, Ajp13Packet outBuf)
       {
   		outBuf.reset();
  -		outBuf.appendByte(JK_AJP13_PONG_REPLY);
  +		outBuf.appendByte(JK_AJP13_CPONG_REPLY);
       	
       	try
       	{
  
  
  
  1.13      +1 -1      jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/Ajp14Interceptor.java
  
  Index: Ajp14Interceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/ajp/tomcat33/Ajp14Interceptor.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Ajp14Interceptor.java	25 Sep 2003 15:24:44 -0000	1.12
  +++ Ajp14Interceptor.java	16 Oct 2003 07:37:32 -0000	1.13
  @@ -248,7 +248,7 @@
   		    }                        
   		}
   		
  -		// 999 low level requests are just ignored (ie ping/pong)
  +		// 999 low level requests are just ignored (ie cping/cpong)
   		if( status  == 200)
   		    cm.service(req, res);
   		else if (status == 500) {
  
  
  

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


Mime
View raw message