costin      01/11/16 14:37:13

  Modified:    jk/native/common jk_uri_worker_map.c jk_uri_worker_map.h
  Log:
  Get the number of mappings in uri_worker_map, quick exit if none.
  
  ( it is possible to configure mod_jk using setHandler, we don't want extra overhead )
  
  Revision  Changes    Path
  1.11      +10 -1     jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.c
  
  Index: jk_uri_worker_map.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jk_uri_worker_map.c       2001/11/07 21:54:45     1.10
  +++ jk_uri_worker_map.c       2001/11/16 22:37:13     1.11
  @@ -67,7 +67,7 @@
    * servlet container.                                                      *
    *                                                                         *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
  - * Version:     $Revision: 1.10 $                                           *
  + * Version:     $Revision: 1.11 $                                           *
    ***************************************************************************/
   
   #include "jk_pool.h"
  @@ -118,7 +118,13 @@
       unsigned            capacity;
   };
   
  +int uri_worker_map_size(jk_uri_worker_map_t *uw_map ) {
  +    if( uw_map == NULL ) 
  +     return 0;
  +    return uw_map->size;
  +} 
   
  +
   /*
    * We are now in a security nightmare, it maybe that somebody sent 
    * us a uri that looks like /top-secret.jsp. and the web server will 
  @@ -444,6 +450,9 @@
                           const char *uri,
                           jk_logger_t *l)
   {
  +    if( uri_worker_map_size( uw_map ) <= 0 )
  +     return NULL;
  +
       jk_log(l, JK_LOG_DEBUG, 
              "Into jk_uri_worker_map_t::map_uri_to_worker\n");    
   
  
  
  
  1.4       +4 -1      jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.h
  
  Index: jk_uri_worker_map.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_uri_worker_map.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_uri_worker_map.h       2001/07/02 21:13:00     1.3
  +++ jk_uri_worker_map.h       2001/11/16 22:37:13     1.4
  @@ -58,7 +58,7 @@
   /***************************************************************************
    * Description: URI to worker mapper header file                           *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
  - * Version:     $Revision: 1.3 $                                           *
  + * Version:     $Revision: 1.4 $                                           *
    ***************************************************************************/
   
   #ifndef JK_URI_WORKER_MAP_H
  @@ -91,6 +91,9 @@
                          char *puri,
                          char *pworker,
                          jk_logger_t *l);
  +
  +int uri_worker_map_size(jk_uri_worker_map_t *uw_map );
  +
   
   int uri_worker_map_close(jk_uri_worker_map_t *uw_map,
                            jk_logger_t *l);
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to