costin      01/09/19 20:43:00

  Modified:    src/share/org/apache/tomcat/modules/server
                        Ajp13Interceptor.java
  Log:
  Shutdown on ajp13 interceptor - made it optional, it's one of the todo items for
  RC2.
  
  Revision  Changes    Path
  1.16      +20 -4     
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java
  
  Index: Ajp13Interceptor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Ajp13Interceptor.java     2001/09/14 15:58:58     1.15
  +++ Ajp13Interceptor.java     2001/09/20 03:43:00     1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java,v
 1.15 2001/09/14 15:58:58 hgomez Exp $
  - * $Revision: 1.15 $
  - * $Date: 2001/09/14 15:58:58 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp13Interceptor.java,v
 1.16 2001/09/20 03:43:00 costin Exp $
  + * $Revision: 1.16 $
  + * $Date: 2001/09/20 03:43:00 $
    *
    * ====================================================================
    *
  @@ -80,6 +80,8 @@
       implements  TcpConnectionHandler
   {
       private boolean tomcatAuthentication=true;
  +    private boolean shutDownEnable=false;
  +    
       public Ajp13Interceptor()
       {
           super();
  @@ -89,6 +91,20 @@
   
       // -------------------- PoolTcpConnector --------------------
   
  +    /** Enable shutdown command. By default it is disabled, since
  +     *       ajp12 has an improved version with password checking.
  +     *
  +     *       In future we'll enable shutdown in ajp13/14 and deprecate ajp12,
  +     *       and merge various improvements from ajp12.
  +     *
  +     *  Note that this you can use ajp13 for communication with the server
  +     *       and ajp12 only for shutdown - that would allow some extra flexibility,
  +     *       especially if you use firewall rules.
  +    */
  +    public void setShutDownEnable(boolean b ) {
  +     shutDownEnable=b;
  +    }
  +    
       protected void localInit() throws Exception {
        ep.setConnectionHandler( this );
       }
  @@ -198,7 +214,7 @@
           try {
            // close the socket connection before handling any signal
            // but get the addresses first so they are not corrupted
  -            if(Ajp12.isSameAddress(serverAddr, clientAddr)) {
  +            if(shutDownEnable && Ajp12.isSameAddress(serverAddr, clientAddr)) {
                cm.stop();
                // same behavior as in past, because it seems that
                // stopping everything doesn't work - need to figure
  
  
  

Reply via email to