nacho       02/05/28 17:10:18

  Modified:    jk/native2/common jk_config.c jk_endpoint.c jk_env.c
                        jk_registry.c jk_registry.h jk_workerEnv.c
               jk/native2/include jk_config.h jk_env.h jk_workerEnv.h
               jk/native2/jni jk_jni_aprImpl.c
               jk/native2/server/isapi jk_isapi_plugin.c
  Log:
  * Native win32 logger is the default for IIS
  * Uri parse option now it's part of the standard wk2.p, deleted registry key and 
asociated defines, and changed code to use workerEnv->options
  * Added env->SoName  for the win32 logger registry settings
  * Added workerEnv->logger_name and used it at init to use some logger different form 
default one ( currently logger.file only )
  * Reordered initializations, to read first the config file, and later try to 
initialize the logger.
  
  Revision  Changes    Path
  1.22      +59 -52    jakarta-tomcat-connectors/jk/native2/common/jk_config.c
  
  Index: jk_config.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_config.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- jk_config.c       23 May 2002 14:54:07 -0000      1.21
  +++ jk_config.c       29 May 2002 00:10:17 -0000      1.22
  @@ -58,7 +58,7 @@
   /***************************************************************************
    * Description: General purpose config object                                 *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
  - * Version:     $Revision: 1.21 $                                           *
  + * Version:     $Revision: 1.22 $                                           *
    ***************************************************************************/
   
   #include "jk_global.h"
  @@ -439,61 +439,69 @@
    *  and any removal may have disastrous consequences. Using critical
    *  sections would drastically affect the performance.
    */
  -static int jk2_config_processConfigData(jk_env_t *env, jk_config_t *cfg,
  -                                        jk_map_t *cfgData, int firstTime )
  +static int jk2_config_processConfigData(jk_env_t *env, jk_config_t *cfg,int 
firstTime )
   {
       int i;
  -    int j;
  +    int rc;
       
  -    for( i=0; i<cfgData->size( env, cfgData ); i++ ) {
  -        char *name=cfgData->nameAt(env, cfgData, i);
  -        jk_map_t *prefNode=cfgData->valueAt(env, cfgData, i);
  -        jk_bean_t *bean;
  -        int ver;
  -        char *verString;
  -
  -        bean=env->getBean( env, name );
  -        if( bean==NULL ) {
  -            if( cfg->mbean->debug > 0 ) {
  -                env->l->jkLog(env, env->l, JK_LOG_INFO, 
  -                              "config.setConfig():  Creating %s\n", name );
  -            }
  -            bean=env->createBean( env, cfg->pool, name );
  -        }
  +    for( i=0; i<cfg->cfgData->size( env, cfg->cfgData ); i++ ) {
  +        char *name=cfg->cfgData->nameAt(env, cfg->cfgData, i);
  +        rc=cfg->processNode(env, cfg , name, firstTime);
  +    }
  +    return rc;
  +}
   
  -        if( bean == NULL ) {
  -            /* Can't create it, save the value in our map */
  -            env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                          "config.update(): Can't create %s\n", name );
  -            continue;
  +static int jk2_config_processNode(jk_env_t *env, jk_config_t *cfg, char *name, int 
firstTime )
  +{
  +    int j;   
  +    
  +    jk_map_t *prefNode=cfg->cfgData->get(env, cfg->cfgData, name);
  +    jk_bean_t *bean;
  +    int ver;
  +    char *verString;
  +
  +    bean=env->getBean( env, name );
  +    if( bean==NULL ) {
  +        if( cfg->mbean->debug > 0 ) {
  +            env->l->jkLog(env, env->l, JK_LOG_INFO, 
  +                          "config.setConfig():  Creating %s\n", name );
           }
  +        bean=env->createBean( env, cfg->pool, name );
  +    }
   
  -        verString= prefNode->get( env, prefNode, "ver" );
  -        if( !firstTime ) {
  -            if( verString == NULL ) continue;
  -        
  -            ver=atoi( verString );
  -            
  -            if( ver <= bean->ver) {
  -                /* Object didn't change
  -                 */
  -                continue;
  -            }
  +    if( bean == NULL ) {
  +        /* Can't create it, save the value in our map */
  +        env->l->jkLog(env, env->l, JK_LOG_ERROR,
  +                      "config.update(): Can't create %s\n", name );
  +        return JK_ERR;
  +    }
  +
  +    verString= prefNode->get( env, prefNode, "ver" );
  +    if( !firstTime ) {
  +        if( verString == NULL ) {
  +            return JK_OK;
           }
  +        ver=atoi( verString );
           
  -        if( !firstTime )
  -            env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                          "config.update(): Updating %s\n", name );
  -        
  -        /* XXX Maybe we shoud destroy/init ? */
  -        
  -        for( j=0; j<prefNode->size( env, prefNode ); j++ ) {
  -            char *pname=prefNode->nameAt(env, prefNode, j);
  -            char *pvalue=prefNode->valueAt(env, prefNode, j);
  -
  -            cfg->setProperty( env, cfg, bean, pname, pvalue );
  +        if( ver <= bean->ver) {
  +            /* Object didn't change
  +             */
  +            return JK_OK;
           }
       }
  +    
  +    if( !firstTime )
  +        env->l->jkLog(env, env->l, JK_LOG_INFO,
  +                      "config.update(): Updating %s\n", name );
  +    
  +    /* XXX Maybe we shoud destroy/init ? */
  +    
  +    for( j=0; j<prefNode->size( env, prefNode ); j++ ) {
  +        char *pname=prefNode->nameAt(env, prefNode, j);
  +        char *pvalue=prefNode->valueAt(env, prefNode, j);
  +
  +        cfg->setProperty( env, cfg, bean, pname, pvalue );
  +    }
   
       return JK_OK;
   }
  @@ -505,7 +513,6 @@
       int rc;
       int csOk;
       struct stat statbuf;
  -    jk_map_t *cfgData;
   
       if( didReload!=NULL )
           *didReload=JK_FALSE;
  @@ -553,14 +560,14 @@
                     "cfg.update() Updating config %s %d %d\n",
                     cfg->file, cfg->mtime, statbuf.st_mtime);
       
  -    jk2_map_default_create(env, &cfgData, env->tmpPool);
  +    jk2_map_default_create(env, &cfg->cfgData, env->tmpPool);
   
  -    rc=jk2_map_read(env, cfgData , cfg->file );
  +    rc=jk2_map_read(env, cfg->cfgData , cfg->file );
       
       if( rc==JK_OK ) {
           env->l->jkLog(env, env->l, JK_LOG_INFO, 
                         "config.setConfig():  Reading properties %s %d\n",
  -                      cfg->file, cfgData->size( env, cfgData ) );
  +                      cfg->file, cfg->cfgData->size( env, cfg->cfgData ) );
       } else {
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
                         "config.setConfig(): Error reading properties %s\n",
  @@ -569,7 +576,7 @@
           return JK_ERR;
       }
       
  -    rc=jk2_config_processConfigData( env, cfg, cfgData, firstTime );
  +    rc=jk2_config_processConfigData( env, cfg, firstTime );
   
       if( didReload!=NULL )
           *didReload=JK_TRUE;
  @@ -628,7 +635,7 @@
       _this->setProperty=jk2_config_setProperty;
       _this->save=jk2_config_saveConfig;
       _this->mbean=result;
  -    
  +    _this->processNode=jk2_config_processNode;
       _this->ver=0;
   
       result->object=_this;
  
  
  
  1.17      +1 -0      jakarta-tomcat-connectors/jk/native2/common/jk_endpoint.c
  
  Index: jk_endpoint.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_endpoint.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_endpoint.c     28 May 2002 22:44:50 -0000      1.16
  +++ jk_endpoint.c     29 May 2002 00:10:17 -0000      1.17
  @@ -152,6 +152,7 @@
       e->stats = NULL;
       e->channelData = NULL;
       e->currentRequest = NULL;
  +    e->worker=NULL;
       epId=atoi( result->localName );
       
       result->object = e;
  
  
  
  1.31      +2 -1      jakarta-tomcat-connectors/jk/native2/common/jk_env.c
  
  Index: jk_env.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- jk_env.c  28 May 2002 22:47:43 -0000      1.30
  +++ jk_env.c  29 May 2002 00:10:17 -0000      1.31
  @@ -143,7 +143,8 @@
           env->globalPool=parentEnv->globalPool;
           env->envCache=parentEnv->envCache;
           env->debug=parentEnv->debug;
  -        
  +        env->soName=parentEnv->soName;
  +
           if( env->debug > 0 ) {
               if( env->l == NULL ) 
                   fprintf( stderr, "env:Create child env %p %p\n", parentEnv, env);
  
  
  
  1.25      +2 -1      jakarta-tomcat-connectors/jk/native2/common/jk_registry.c
  
  Index: jk_registry.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_registry.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- jk_registry.c     16 May 2002 23:45:41 -0000      1.24
  +++ jk_registry.c     29 May 2002 00:10:17 -0000      1.25
  @@ -67,7 +67,7 @@
   
   /***************************************************************************
    * Description: Worker list                                                *
  - * Version:     $Revision: 1.24 $                                           *
  + * Version:     $Revision: 1.25 $                                           *
    ***************************************************************************/
   
   /** Static declarations for all 'hardcoded' modules. This is a hack, 
  @@ -110,6 +110,7 @@
      * error, I'm casting the function pointers to (void *) - mmanders
      */
     env->registerFactory( env, "logger.file",   jk2_logger_file_factory );
  +  env->registerFactory( env, "logger.win32",   jk2_logger_win32_factory );
     env->registerFactory( env, "workerEnv", jk2_workerEnv_factory );
     env->registerFactory( env, "uriMap", jk2_uriMap_factory );
     env->registerFactory( env, "uriEnv", jk2_uriEnv_factory );
  
  
  
  1.16      +4 -1      jakarta-tomcat-connectors/jk/native2/common/jk_registry.h
  
  Index: jk_registry.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_registry.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- jk_registry.h     16 May 2002 23:45:41 -0000      1.15
  +++ jk_registry.h     29 May 2002 00:10:17 -0000      1.16
  @@ -62,7 +62,7 @@
   
   /***************************************************************************
    * Description: Worker list                                                *
  - * Version:     $Revision: 1.15 $                                           *
  + * Version:     $Revision: 1.16 $                                           *
    ***************************************************************************/
   
   /** Static declarations for all 'hardcoded' modules. This is a hack, 
  @@ -172,3 +172,6 @@
   int JK_METHOD jk2_config_factory(jk_env_t *env, jk_pool_t *pool, jk_bean_t *result,
                                    const char *type, const char *name);
   
  +int JK_METHOD jk2_logger_win32_factory(jk_env_t *env, jk_pool_t *pool,
  +                                      jk_bean_t *result,
  +                                      const char *type, const char *name);
  
  
  
  1.47      +18 -7     jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c
  
  Index: jk_workerEnv.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_workerEnv.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- jk_workerEnv.c    28 May 2002 22:47:43 -0000      1.46
  +++ jk_workerEnv.c    29 May 2002 00:10:17 -0000      1.47
  @@ -59,7 +59,7 @@
    * Description: Workers controller                                         *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
    * Author:      Henri Gomez <[EMAIL PROTECTED]>                               *
  - * Version:     $Revision: 1.46 $                                           *
  + * Version:     $Revision: 1.47 $                                           *
    ***************************************************************************/
   
   #include "jk_env.h"
  @@ -87,7 +87,9 @@
   
       /** XXX Should it be per/uri ?
        */
  -    if( strcmp( name, "sslEnable" )==0 ) {
  +    if( strcmp( name, "logger" )==0 ) {
  +        wEnv->logger_name = value;
  +    } else if( strcmp( name, "sslEnable" )==0 ) {
           wEnv->ssl_enable = JK_TRUE;
       } else if( strcmp( name, "timing" )==0 ) {
           wEnv->timing= atoi( value );
  @@ -334,9 +336,8 @@
   static int jk2_workerEnv_init(jk_env_t *env, jk_workerEnv_t *wEnv)
   {
       char *configFile;
  -
  -    env->l->init( env, env->l );
  -
  +    jk_bean_t *jkb;
  +   
       /* We need to pid here - Linux will return the pid of the thread if
          called after init(), and we'll not be able to locate the slot id
          This is part of the workarounds needed for Apache2's removal of
  @@ -352,6 +353,17 @@
           configFile=wEnv->config->file;
       }
   
  +    if( wEnv->logger_name!=NULL){
  +        char alias_name[100]="";
  +        jkb=env->getBean(env,wEnv->logger_name);
  +        if (jkb == NULL){
  +            jkb=env->createBean2( env, env->globalPool, wEnv->logger_name, "");
  +        }
  +        env->alias( env, strcat(strcat(alias_name,wEnv->logger_name),":"), 
"logger");
  +        env->l = jkb->object;
  +    }
  +    env->l->init( env, env->l );
  +
       /* Set default worker. It'll be used for all uris that have no worker
        */
       if( wEnv->defaultWorker == NULL ) {
  @@ -684,8 +696,7 @@
                              ARCH, NULL );
   
   
  -    wEnv->log_file        = NULL;
  -    wEnv->log_level       = -1;
  +    wEnv->logger_name     = "logger.file";
       wEnv->was_initialized = JK_FALSE;
       wEnv->options         = JK_OPT_FWDURIDEFAULT;
   
  
  
  
  1.7       +5 -1      jakarta-tomcat-connectors/jk/native2/include/jk_config.h
  
  Index: jk_config.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_config.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jk_config.h       14 May 2002 17:00:59 -0000      1.6
  +++ jk_config.h       29 May 2002 00:10:18 -0000      1.7
  @@ -110,6 +110,10 @@
        */
       int (*update)( struct jk_env *env, struct jk_config *cfg, int *didReload);
   
  +    /** Process a node in config data
  +     */
  +    int (*processNode)( struct jk_env *env, struct jk_config *cfg, char *node, int 
didReload);
  +
       /* Private data */
       struct jk_pool *pool;
       void *_private;
  @@ -119,7 +123,7 @@
       char *file;
       
       char *section;
  -
  +    struct jk_map *cfgData;
       /* Only one thread can update the config
        */
       JK_CRIT_SEC cs;
  
  
  
  1.17      +1 -0      jakarta-tomcat-connectors/jk/native2/include/jk_env.h
  
  Index: jk_env.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_env.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_env.h  24 May 2002 04:26:00 -0000      1.16
  +++ jk_env.h  29 May 2002 00:10:18 -0000      1.17
  @@ -230,6 +230,7 @@
       struct jk_exception *lastException;
       int id;
       int debug;
  +    char *soName;
   };
   
   void JK_METHOD jk2_registry_init(jk_env_t *env);
  
  
  
  1.25      +2 -3      jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- jk_workerEnv.h    26 May 2002 07:31:12 -0000      1.24
  +++ jk_workerEnv.h    29 May 2002 00:10:18 -0000      1.25
  @@ -58,7 +58,7 @@
   /***************************************************************************
    * Description: Workers controller header file                             *
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           * 
  - * Version:     $Revision: 1.24 $                                           *
  + * Version:     $Revision: 1.25 $                                           *
    ***************************************************************************/
   
   #ifndef JK_WORKERENV_H
  @@ -189,8 +189,7 @@
        * Log options. XXX move it to uriEnv, make it configurable per webapp.
        * XXX What about apache native logger ?
        */
  -    char *log_file;
  -    int  log_level;
  +    char *logger_name;
   
       struct jk_uriMap *uriMap;
   
  
  
  
  1.27      +0 -1      jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c
  
  Index: jk_jni_aprImpl.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- jk_jni_aprImpl.c  28 May 2002 22:34:59 -0000      1.26
  +++ jk_jni_aprImpl.c  29 May 2002 00:10:18 -0000      1.27
  @@ -479,7 +479,6 @@
       char *name=(char *)(*jniEnv)->GetStringUTFChars(jniEnv, nameJ, 0);
       char *value;
       jstring valueJ=NULL;
  -    int rc;
       
       if( component->setAttribute ==NULL )
           return JK_OK;
  
  
  
  1.20      +215 -253  
jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c
  
  Index: jk_isapi_plugin.c
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native2/server/isapi/jk_isapi_plugin.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- jk_isapi_plugin.c 24 May 2002 15:17:27 -0000      1.19
  +++ jk_isapi_plugin.c 29 May 2002 00:10:18 -0000      1.20
  @@ -60,7 +60,7 @@
    * Author:      Gal Shachor <[EMAIL PROTECTED]>                           *
    * Author:      Larry Isaacs <[EMAIL PROTECTED]>                           *
    * Author:      Ignacio J. Ortega <[EMAIL PROTECTED]>                       *
  - * Version:     $Revision: 1.19 $                                           *
  + * Version:     $Revision: 1.20 $                                           *
    ***************************************************************************/
   
   // This define is needed to include wincrypt,h, needed to get client certificates
  @@ -82,16 +82,17 @@
   #include "jk_iis.h"
   //#include "jk_uri_worker_map.h"
   
  -#define SERVER_ROOT_TAG          ("serverRoot")
  +#define SERVER_ROOT_TAG         ("serverRoot")
   #define URI_SELECT_TAG          ("uriSelect")
   #define EXTENSION_URI_TAG       ("extensionUri")
  -#define WORKERS_FILE_TAG       ("workersFile")
  +#define WORKERS_FILE_TAG        ("workersFile")
   
   #define URI_SELECT_PARSED_VERB      ("parsed")
   #define URI_SELECT_UNPARSED_VERB    ("unparsed")
   #define URI_SELECT_ESCAPED_VERB     ("escaped")
   
   
  +static char  file_name[_MAX_PATH];
   static char  ini_file_name[MAX_PATH];
   static int   using_ini_file = JK_FALSE;
   static int   is_inited = JK_FALSE;
  @@ -102,16 +103,8 @@
   
   
   static char extension_uri[INTERNET_MAX_URL_LENGTH] = 
"/jakarta/isapi_redirector2.dll";
  -static char worker_file[MAX_PATH * 2];
  -static char server_root[MAX_PATH * 2];
  -
  -
  -
  -#define URI_SELECT_OPT_PARSED       0
  -#define URI_SELECT_OPT_UNPARSED     1
  -#define URI_SELECT_OPT_ESCAPED      2
  -
  -static int uri_select_option = URI_SELECT_OPT_PARSED;
  +static char worker_file[MAX_PATH * 2] = "";
  +static char server_root[MAX_PATH * 2] = "";
   
   
   static int init_jk(char *serverName);
  @@ -178,10 +171,6 @@
   
       strcpy(pVer->lpszFilterDesc, VERSION_STRING);
   
  -    if (!is_inited) {
  -        return initialize_extension();
  -    }
  -
       return TRUE;
   }
   
  @@ -192,227 +181,237 @@
       jk_env_t *env=NULL; 
       jk_uriEnv_t *uriEnv=NULL;
   
  +    if (!is_inited) {
  +        initialize_extension();
  +    }
  +
       /* Initialise jk */
       if (is_inited && !is_mapread) {
           char serverName[MAX_SERVERNAME];
           DWORD dwLen = sizeof(serverName);
   
           if (pfc->GetServerVariable(pfc, SERVER_NAME, serverName, &dwLen)){
  -            if (dwLen > 0) serverName[dwLen-1] = '\0';
  -            if (init_jk(serverName))
  +            if (dwLen > 0) {
  +                serverName[dwLen-1] = '\0';
  +            }
  +            if (init_jk(serverName)){
                   is_mapread = JK_TRUE;
  +            }
           }
           /* If we can't read the map we become dormant */
           if (!is_mapread)
               is_inited = JK_FALSE;
       }
  -    env = workerEnv->globalEnv->getEnv( workerEnv->globalEnv );
  -    if (is_inited && (iis5 < 0) ) {
  -        char serverSoftware[256];
  -        DWORD dwLen = sizeof(serverSoftware);
  -             iis5=0;
  -        if (pfc->GetServerVariable(pfc,SERVER_SOFTWARE, serverSoftware, &dwLen)){
  -                     iis5=(atof(serverSoftware + 14) >= 5.0);
  -                     if (iis5) {
  -                             env->l->jkLog(env, env->l,  JK_LOG_INFO,"Detected IIS 
>= 5.0\n");
  -                     } else {
  -                             env->l->jkLog(env, env->l,  JK_LOG_INFO,"Detected IIS 
< 5.0\n");
  -                     }
  +    if (is_inited && is_mapread) {
  +        env = workerEnv->globalEnv->getEnv( workerEnv->globalEnv );
  +        if (is_inited && (iis5 < 0) ) {
  +            char serverSoftware[256];
  +            DWORD dwLen = sizeof(serverSoftware);
  +                 iis5=0;
  +            if (pfc->GetServerVariable(pfc,SERVER_SOFTWARE, serverSoftware, 
&dwLen)){
  +                         iis5=(atof(serverSoftware + 14) >= 5.0);
  +                         if (iis5) {
  +                                 env->l->jkLog(env, env->l,  JK_LOG_INFO,"Detected 
IIS >= 5.0\n");
  +                         } else {
  +                                 env->l->jkLog(env, env->l,  JK_LOG_INFO,"Detected 
IIS < 5.0\n");
  +                         }
  +            }
           }
  -    }
   #ifdef SF_NOTIFY_AUTH_COMPLETE
  -    if (is_inited &&
  -         (((SF_NOTIFY_PREPROC_HEADERS == dwNotificationType) && !iis5) ||
  -               ((SF_NOTIFY_AUTH_COMPLETE   == dwNotificationType) &&  iis5)
  -               )
  -             )
  +        if (is_inited &&
  +             (((SF_NOTIFY_PREPROC_HEADERS == dwNotificationType) && !iis5) ||
  +                   ((SF_NOTIFY_AUTH_COMPLETE   == dwNotificationType) &&  iis5)
  +                   )
  +                 )
   #else
  -     if (is_inited && (SF_NOTIFY_PREPROC_HEADERS == dwNotificationType))
  +         if (is_inited && (SF_NOTIFY_PREPROC_HEADERS == dwNotificationType))
   #endif
  -     { 
  -        char uri[INTERNET_MAX_URL_LENGTH]; 
  -        char snuri[INTERNET_MAX_URL_LENGTH]="/";
  -        char Host[INTERNET_MAX_URL_LENGTH];
  -        char Translate[INTERNET_MAX_URL_LENGTH];
  -             BOOL (WINAPI * GetHeader) 
  -                     (struct _HTTP_FILTER_CONTEXT * pfc, LPSTR lpszName, LPVOID 
lpvBuffer, LPDWORD lpdwSize );
  -             BOOL (WINAPI * SetHeader) 
  -                     (struct _HTTP_FILTER_CONTEXT * pfc, LPSTR lpszName, LPSTR 
lpszValue );
  -             BOOL (WINAPI * AddHeader) 
  -                     (struct _HTTP_FILTER_CONTEXT * pfc, LPSTR lpszName,LPSTR 
lpszValue );
  -        char *query;
  -        DWORD sz = sizeof(uri);
  -        DWORD szHost = sizeof(Host);
  -        DWORD szTranslate = sizeof(Translate);
  +         { 
  +            char uri[INTERNET_MAX_URL_LENGTH]; 
  +            char snuri[INTERNET_MAX_URL_LENGTH]="/";
  +            char Host[INTERNET_MAX_URL_LENGTH];
  +            char Translate[INTERNET_MAX_URL_LENGTH];
  +                 BOOL (WINAPI * GetHeader) 
  +                         (struct _HTTP_FILTER_CONTEXT * pfc, LPSTR lpszName, LPVOID 
lpvBuffer, LPDWORD lpdwSize );
  +                 BOOL (WINAPI * SetHeader) 
  +                         (struct _HTTP_FILTER_CONTEXT * pfc, LPSTR lpszName, LPSTR 
lpszValue );
  +                 BOOL (WINAPI * AddHeader) 
  +                         (struct _HTTP_FILTER_CONTEXT * pfc, LPSTR lpszName,LPSTR 
lpszValue );
  +            char *query;
  +            DWORD sz = sizeof(uri);
  +            DWORD szHost = sizeof(Host);
  +            DWORD szTranslate = sizeof(Translate);
   
   #ifdef SF_NOTIFY_AUTH_COMPLETE
  -             if (iis5) {
  -                     
GetHeader=((PHTTP_FILTER_AUTH_COMPLETE_INFO)pvNotification)->GetHeader;
  -                     
SetHeader=((PHTTP_FILTER_AUTH_COMPLETE_INFO)pvNotification)->SetHeader;
  -                     
AddHeader=((PHTTP_FILTER_AUTH_COMPLETE_INFO)pvNotification)->AddHeader;
  -             } else {
  -                     
GetHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->GetHeader;
  -                     
SetHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->SetHeader;
  -                     
AddHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->AddHeader;
  -             }
  +                 if (iis5) {
  +                         
GetHeader=((PHTTP_FILTER_AUTH_COMPLETE_INFO)pvNotification)->GetHeader;
  +                         
SetHeader=((PHTTP_FILTER_AUTH_COMPLETE_INFO)pvNotification)->SetHeader;
  +                         
AddHeader=((PHTTP_FILTER_AUTH_COMPLETE_INFO)pvNotification)->AddHeader;
  +                 } else {
  +                         
GetHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->GetHeader;
  +                         
SetHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->SetHeader;
  +                         
AddHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->AddHeader;
  +                 }
   #else
  -                     
GetHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->GetHeader;
  -                     
SetHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->SetHeader;
  -                     
AddHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->AddHeader;
  +                         
GetHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->GetHeader;
  +                         
SetHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->SetHeader;
  +                         
AddHeader=((PHTTP_FILTER_PREPROC_HEADERS)pvNotification)->AddHeader;
   #endif
   
   
   
  -        env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  -               "HttpFilterProc started\n");
  +            env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  +                   "HttpFilterProc started\n");
   
   
  -        /*
  -         * Just in case somebody set these headers in the request!
  -         */
  -        SetHeader(pfc, URI_HEADER_NAME, NULL);
  -        SetHeader(pfc, QUERY_HEADER_NAME, NULL);
  -        SetHeader(pfc, WORKER_HEADER_NAME, NULL);
  -        SetHeader(pfc, TOMCAT_TRANSLATE_HEADER_NAME, NULL);
  +            /*
  +             * Just in case somebody set these headers in the request!
  +             */
  +            SetHeader(pfc, URI_HEADER_NAME, NULL);
  +            SetHeader(pfc, QUERY_HEADER_NAME, NULL);
  +            SetHeader(pfc, WORKER_HEADER_NAME, NULL);
  +            SetHeader(pfc, TOMCAT_TRANSLATE_HEADER_NAME, NULL);
           
  -        if (!GetHeader(pfc, "url", (LPVOID)uri, (LPDWORD)&sz)) {
  -            env->l->jkLog(env, env->l,  JK_LOG_ERROR, 
  -                   "HttpFilterProc error while getting the url\n");
  -            workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
  -            return SF_STATUS_REQ_ERROR;
  -        }
  -
  -        if (strlen(uri)) {
  -            int rc;
  -            char *worker=0;
  -            query = strchr(uri, '?');
  -            if (query) {
  -                *query++ = '\0';
  -            }
  -
  -            rc = jk_requtil_unescapeUrl(uri);
  -            if (rc == BAD_REQUEST) {
  +            if (!GetHeader(pfc, "url", (LPVOID)uri, (LPDWORD)&sz)) {
                   env->l->jkLog(env, env->l,  JK_LOG_ERROR, 
  -                       "HttpFilterProc [%s] contains one or more invalid escape 
sequences.\n", 
  -                       uri);
  -                write_error_response(pfc,"400 Bad Request",
  -                        "<HTML><BODY><H1>Request contains invalid 
encoding</H1></BODY></HTML>");
  +                       "HttpFilterProc error while getting the url\n");
                   workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
  -                return SF_STATUS_REQ_FINISHED;
  +                return SF_STATUS_REQ_ERROR;
               }
  -            else if(rc == BAD_PATH) {
  -                env->l->jkLog(env, env->l,  JK_LOG_EMERG, 
  -                       "HttpFilterProc [%s] contains forbidden escape 
sequences.\n", 
  -                       uri);
  -                write_error_response(pfc,"403 Forbidden",
  -                        "<HTML><BODY><H1>Access is Forbidden</H1></BODY></HTML>");
  -                workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
  -                return SF_STATUS_REQ_FINISHED;
  -            }
  -            jk_requtil_getParents(uri);
  -
   
  -            if(GetHeader(pfc, "Host:", (LPVOID)Host, (LPDWORD)&szHost)) {
  -                env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  -                       "In HttpFilterProc Virtual Host redirection of %s\n", 
  -                       Host);
  -                uriEnv = workerEnv->uriMap->mapUri(env, workerEnv->uriMap,Host,uri 
);
  -            }
  +            if (strlen(uri)) {
  +                int rc;
  +                char *worker=0;
  +                query = strchr(uri, '?');
  +                if (query) {
  +                    *query++ = '\0';
  +                }
   
  -            if (uriEnv==NULL) {
  -                env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  -                       "In HttpFilterProc test Default redirection of %s\n", 
  -                       uri);
  -                uriEnv = workerEnv->uriMap->mapUri(env, workerEnv->uriMap,NULL,uri 
);
  -            }
  +                rc = jk_requtil_unescapeUrl(uri);
  +                if (rc == BAD_REQUEST) {
  +                    env->l->jkLog(env, env->l,  JK_LOG_ERROR, 
  +                           "HttpFilterProc [%s] contains one or more invalid escape 
sequences.\n", 
  +                           uri);
  +                    write_error_response(pfc,"400 Bad Request",
  +                            "<HTML><BODY><H1>Request contains invalid 
encoding</H1></BODY></HTML>");
  +                    workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
  +                    return SF_STATUS_REQ_FINISHED;
  +                }
  +                else if(rc == BAD_PATH) {
  +                    env->l->jkLog(env, env->l,  JK_LOG_EMERG, 
  +                           "HttpFilterProc [%s] contains forbidden escape 
sequences.\n", 
  +                           uri);
  +                    write_error_response(pfc,"403 Forbidden",
  +                            "<HTML><BODY><H1>Access is 
Forbidden</H1></BODY></HTML>");
  +                    workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
  +                    return SF_STATUS_REQ_FINISHED;
  +                }
  +                jk_requtil_getParents(uri);
   
  -            if (uriEnv!=NULL) {
  -                char *forwardURI;
   
  -                /* This is a servlet, should redirect ... */
  -                env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  -                       "HttpFilterProc [%s] is a servlet url - should redirect to 
%s\n", 
  -                       uri, uriEnv->workerName);
  -                
  -                /* get URI we should forward */
  -                if (uri_select_option == URI_SELECT_OPT_UNPARSED) {
  -                    /* get original unparsed URI */
  -                    GetHeader(pfc, "url", (LPVOID)uri, (LPDWORD)&sz);
  -                    /* restore terminator for uri portion */
  -                    if (query)
  -                        *(query - 1) = '\0';
  +                if(GetHeader(pfc, "Host:", (LPVOID)Host, (LPDWORD)&szHost)) {
                       env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  -                           "HttpFilterProc fowarding original URI [%s]\n",uri);
  -                    forwardURI = uri;
  -                } else if (uri_select_option == URI_SELECT_OPT_ESCAPED) {
  -                    if (!jk_requtil_escapeUrl(uri,snuri,INTERNET_MAX_URL_LENGTH)) {
  -                        env->l->jkLog(env, env->l,  JK_LOG_ERROR, 
  -                               "HttpFilterProc [%s] re-encoding request exceeds 
maximum buffer size.\n", 
  -                               uri);
  -                        write_error_response(pfc,"400 Bad Request",
  -                                "<HTML><BODY><H1>Request contains too many 
characters that need to be encoded.</H1></BODY></HTML>");
  -                        workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env 
);
  -                        return SF_STATUS_REQ_FINISHED;
  -                    }
  -                    env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  -                           "HttpFilterProc fowarding escaped URI [%s]\n",snuri);
  -                    forwardURI = snuri;
  -                } else {
  -                    forwardURI = uri;
  +                           "In HttpFilterProc Virtual Host redirection of %s\n", 
  +                           Host);
  +                    uriEnv = workerEnv->uriMap->mapUri(env, 
workerEnv->uriMap,Host,uri );
                   }
   
  -                if(!AddHeader(pfc, URI_HEADER_NAME, forwardURI) || 
  -                   ( (query != NULL && strlen(query) > 0)
  -                           ? !AddHeader(pfc, QUERY_HEADER_NAME, query) : FALSE ) || 
  -                   !AddHeader(pfc, WORKER_HEADER_NAME, uriEnv->workerName) ||
  -                   !SetHeader(pfc, "url", extension_uri)) {
  -                    env->l->jkLog(env, env->l,  JK_LOG_ERROR, 
  -                           "HttpFilterProc error while adding request headers\n");
  -                    workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
  -                    return SF_STATUS_REQ_ERROR;
  +                if (uriEnv==NULL) {
  +                    env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  +                           "In HttpFilterProc test Default redirection of %s\n", 
  +                           uri);
  +                    uriEnv = workerEnv->uriMap->mapUri(env, 
workerEnv->uriMap,NULL,uri );
                   }
  -                             
  -                /* Move Translate: header to a temporary header so
  -                 * that the extension proc will be called.
  -                 * This allows the servlet to handle 'Translate: f'.
  -                 */
  -                if(GetHeader(pfc, "Translate:", (LPVOID)Translate, 
(LPDWORD)&szTranslate) &&
  -                    Translate != NULL && szTranslate > 0) {
  -                    if (!AddHeader(pfc, TOMCAT_TRANSLATE_HEADER_NAME, Translate)) {
  +
  +                if( uriEnv!=NULL ) {
  +                    char *forwardURI;
  +
  +                    /* This is a servlet, should redirect ... */
  +                    env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  +                           "HttpFilterProc [%s] is a servlet url - should redirect 
to %s\n", 
  +                           uri, uriEnv->workerName);
  +                
  +                    /* get URI we should forward */
  +                
  +                    if( workerEnv->options == JK_OPT_FWDURICOMPATUNPARSED ){
  +                        /* get original unparsed URI */
  +                        GetHeader(pfc, "url", (LPVOID)uri, (LPDWORD)&sz);
  +                        /* restore terminator for uri portion */
  +                        if (query)
  +                            *(query - 1) = '\0';
  +                        env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  +                               "HttpFilterProc fowarding original URI [%s]\n",uri);
  +                        forwardURI = uri;
  +                    } else if( workerEnv->options == JK_OPT_FWDURIESCAPED ){
  +                        if 
(!jk_requtil_escapeUrl(uri,snuri,INTERNET_MAX_URL_LENGTH)) {
  +                            env->l->jkLog(env, env->l,  JK_LOG_ERROR, 
  +                                   "HttpFilterProc [%s] re-encoding request exceeds 
maximum buffer size.\n", 
  +                                   uri);
  +                            write_error_response(pfc,"400 Bad Request",
  +                                    "<HTML><BODY><H1>Request contains too many 
characters that need to be encoded.</H1></BODY></HTML>");
  +                            workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, 
env );
  +                            return SF_STATUS_REQ_FINISHED;
  +                        }
  +                        env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  +                               "HttpFilterProc fowarding escaped URI [%s]\n",snuri);
  +                        forwardURI = snuri;
  +                    } else {
  +                        forwardURI = uri;
  +                    }
  +
  +                    if(!AddHeader(pfc, URI_HEADER_NAME, forwardURI) || 
  +                       ( (query != NULL && strlen(query) > 0)
  +                               ? !AddHeader(pfc, QUERY_HEADER_NAME, query) : FALSE 
) || 
  +                       !AddHeader(pfc, WORKER_HEADER_NAME, uriEnv->workerName) ||
  +                       !SetHeader(pfc, "url", extension_uri)) {
                           env->l->jkLog(env, env->l,  JK_LOG_ERROR, 
  -                          "HttpFilterProc error while adding Tomcat-Translate 
headers\n");
  +                               "HttpFilterProc error while adding request 
headers\n");
                           workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env 
);
                           return SF_STATUS_REQ_ERROR;
                       }
  -                SetHeader(pfc, "Translate:", NULL);
  +                                 
  +                    /* Move Translate: header to a temporary header so
  +                     * that the extension proc will be called.
  +                     * This allows the servlet to handle 'Translate: f'.
  +                     */
  +                    if(GetHeader(pfc, "Translate:", (LPVOID)Translate, 
(LPDWORD)&szTranslate) &&
  +                        Translate != NULL && szTranslate > 0) {
  +                        if (!AddHeader(pfc, TOMCAT_TRANSLATE_HEADER_NAME, 
Translate)) {
  +                            env->l->jkLog(env, env->l,  JK_LOG_ERROR, 
  +                              "HttpFilterProc error while adding Tomcat-Translate 
headers\n");
  +                            workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, 
env );
  +                            return SF_STATUS_REQ_ERROR;
  +                        }
  +                    SetHeader(pfc, "Translate:", NULL);
  +                    }
  +                } else {
  +                    env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  +                           "HttpFilterProc [%s] is not a servlet url\n", 
  +                           uri);
                   }
  -            } else {
  +
  +                /*
  +                 * Check if somebody is feeding us with his own TOMCAT data headers.
  +                 * We reject such postings !
  +                 */
                   env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  -                       "HttpFilterProc [%s] is not a servlet url\n", 
  +                       "HttpFilterProc check if [%s] is pointing to the web-inf 
directory\n", 
                          uri);
  -            }
   
  -            /*
  -             * Check if somebody is feeding us with his own TOMCAT data headers.
  -             * We reject such postings !
  -             */
  -            env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  -                   "HttpFilterProc check if [%s] is pointing to the web-inf 
directory\n", 
  -                   uri);
  -
  -            if(jk_requtil_uriIsWebInf(uri)) {
  -                env->l->jkLog(env, env->l,  JK_LOG_EMERG, 
  -                       "HttpFilterProc [%s] points to the web-inf or meta-inf 
directory.\nSomebody try to hack into the site!!!\n", 
  -                       uri);
  +                if(jk_requtil_uriIsWebInf(uri)) {
  +                    env->l->jkLog(env, env->l,  JK_LOG_EMERG, 
  +                           "HttpFilterProc [%s] points to the web-inf or meta-inf 
directory.\nSomebody try to hack into the site!!!\n", 
  +                           uri);
   
  -                write_error_response(pfc,"403 Forbidden",
  -                        "<HTML><BODY><H1>Access is Forbidden</H1></BODY></HTML>");
  -                workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
  -                return SF_STATUS_REQ_FINISHED;
  +                    write_error_response(pfc,"403 Forbidden",
  +                            "<HTML><BODY><H1>Access is 
Forbidden</H1></BODY></HTML>");
  +                    workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
  +                    return SF_STATUS_REQ_FINISHED;
  +                }
               }
           }
  +        workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
       }
  -    workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
       return SF_STATUS_REQ_NEXT_NOTIFICATION;
   }
   
  @@ -424,21 +423,18 @@
   
       strcpy(pVer->lpszExtensionDesc, VERSION_STRING);
   
  -
  -    if (!is_inited) {
  -        return initialize_extension();
  -    }
       return TRUE;
   }
   
   DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK  lpEcb)
   {   
       DWORD rc = HSE_STATUS_ERROR;
  -    jk_env_t *env = workerEnv->globalEnv->getEnv( workerEnv->globalEnv );
  +    jk_env_t *env;
       lpEcb->dwHttpStatusCode = HTTP_STATUS_SERVER_ERROR;
   
  -    env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  -           "HttpExtensionProc started\n");
  +    if (!is_inited) {
  +        initialize_extension();
  +    }
   
        /* Initialise jk */
        if (is_inited && !is_mapread) {
  @@ -453,6 +449,7 @@
                        is_inited = JK_FALSE;
        }
   
  +
        if (is_inited) {
           jk_ws_service_t sOnStack;
           jk_ws_service_t *s=&sOnStack;
  @@ -465,6 +462,10 @@
           jk_pool_t *rPool=NULL;
           int rc1;
   
  +        env = workerEnv->globalEnv->getEnv( workerEnv->globalEnv );
  +        env->l->jkLog(env, env->l,  JK_LOG_DEBUG, 
  +               "HttpExtensionProc started\n");
  +
           GET_SERVER_VARIABLE_VALUE(workerEnv->pool,HTTP_WORKER_HEADER_NAME, ( 
worker_name ));
           worker=env->getByName( env, worker_name);
   
  @@ -512,11 +513,7 @@
           
           rPool->reset(env, rPool);
           
  -        rc1=worker->rPoolCache->put( env, worker->rPoolCache, rPool );
  -        
  -    } else {
  -        env->l->jkLog(env, env->l,  JK_LOG_ERROR, 
  -               "HttpExtensionProc error, not initialized\n");
  +        rc1=worker->rPoolCache->put( env, worker->rPoolCache, rPool );       
       }
       return rc;
   }
  @@ -549,7 +546,6 @@
       char drive[_MAX_DRIVE];
       char dir[_MAX_DIR];
       char fname[_MAX_FNAME];
  -    char file_name[_MAX_PATH];
   
       switch (ulReason) {
           case DLL_PROCESS_DETACH:
  @@ -573,25 +569,26 @@
   
   static int init_jk(char *serverName)
   {
  -    int rc = JK_FALSE;  
  +    int rc = JK_TRUE;  
          
       jk_env_t *env = workerEnv->globalEnv->getEnv( workerEnv->globalEnv );
  +    workerEnv->initData->add( env, workerEnv->initData, "serverRoot",
  +                              workerEnv->pool->pstrdup( env, workerEnv->pool, 
server_root));
       /* Logging the initialization type: registry or properties file in virtual dir
       */
  -//    rc=(JK_OK == workerEnv->config->update( env, workerEnv->config, NULL));
  -    rc=(JK_OK == workerEnv->config->setPropertyString( env, workerEnv->config, 
"config.file", worker_file ));
  +    if(strlen(worker_file)){
  +        rc=(JK_OK != workerEnv->config->setPropertyString( env, workerEnv->config, 
"config.file", worker_file ));
  +    }
  +    workerEnv->init(env,workerEnv);
  +    env->l->jkLog(env, env->l, JK_LOG_ERROR, "Set serverRoot %s\n", server_root);
       if (using_ini_file) {
           env->l->jkLog(env, env->l,  JK_LOG_DEBUG, "Using ini file %s.\n", 
ini_file_name);
       } else {
           env->l->jkLog(env, env->l,  JK_LOG_DEBUG, "Using registry.\n");
       }
  -    //env->l->jkLog(env, env->l,  JK_LOG_DEBUG, "Using log file %s.\n", log_file);
  -    //env->l->jkLog(env, env->l,  JK_LOG_DEBUG, "Using log level %d.\n", log_level);
       env->l->jkLog(env, env->l,  JK_LOG_DEBUG, "Using extension uri %s.\n", 
extension_uri);
       env->l->jkLog(env, env->l,  JK_LOG_DEBUG, "Using server root %s.\n", 
server_root);
       env->l->jkLog(env, env->l,  JK_LOG_DEBUG, "Using worker file %s.\n", 
worker_file);
  -    env->l->jkLog(env, env->l,  JK_LOG_DEBUG, "Using uri select %d.\n", 
uri_select_option);
  -    workerEnv->init(env,workerEnv);
       return rc;
   }
   
  @@ -599,31 +596,11 @@
   {
       jk_env_t *env=jk2_create_config();   
       if (read_registry_init_data(env)) {
  -        workerEnv->initData->add( env, workerEnv->initData, "serverRoot",
  -                                  workerEnv->pool->pstrdup( env, workerEnv->pool, 
server_root));
  -        env->l->jkLog(env, env->l, JK_LOG_ERROR, "Set serverRoot %s\n", 
server_root);
           is_inited = JK_TRUE;
       }
       return is_inited;
   }
   
  -int parse_uri_select(const char *uri_select)
  -{
  -    if(0 == strcasecmp(uri_select, URI_SELECT_PARSED_VERB)) {
  -        return URI_SELECT_OPT_PARSED;
  -    }
  -
  -    if(0 == strcasecmp(uri_select, URI_SELECT_UNPARSED_VERB)) {
  -        return URI_SELECT_OPT_UNPARSED;
  -    }
  -
  -    if(0 == strcasecmp(uri_select, URI_SELECT_ESCAPED_VERB)) {
  -        return URI_SELECT_OPT_ESCAPED;
  -    }
  -
  -    return -1;
  -}
  -
   static int read_registry_init_data(jk_env_t *env)
   {
       char tmpbuf[INTERNET_MAX_URL_LENGTH];
  @@ -650,17 +627,6 @@
               tmp = map->get(env,map,WORKERS_FILE_TAG);
               if (tmp) {
                   strcpy(worker_file, tmp);
  -            } else {
  -                ok = JK_FALSE;
  -            }
  -            tmp = map->get(env,map,URI_SELECT_TAG);
  -            if (tmp) {
  -                int opt = parse_uri_select(tmp);
  -                if (opt >= 0) {
  -                    uri_select_option = opt;
  -                } else {
  -                    ok = JK_FALSE;
  -                }
               }
               using_ini_file=JK_TRUE;            
               return ok;
  @@ -705,17 +671,6 @@
       } else {
           ok = JK_FALSE;
       }
  -    if(get_registry_config_parameter(hkey,
  -                                     URI_SELECT_TAG, 
  -                                     tmpbuf,
  -                                     sizeof(tmpbuf))) {
  -        int opt = parse_uri_select(tmpbuf);
  -        if (opt >= 0) {
  -            uri_select_option = opt;
  -        } else {
  -            ok = JK_FALSE;
  -        }
  -    }
       RegCloseKey(hkey);
       return ok;
   } 
  @@ -768,12 +723,19 @@
       /* Init the environment. */
       
       /* Create the logger */
  -    jkb=env->createBean2( env, env->globalPool, "logger.file", "");
  -    env->alias( env, "logger.file:", "logger");
  +    jkb=env->createBean2( env, env->globalPool, "logger.win32", "");
  +    env->alias( env, "logger.win32:", "logger");
       l = jkb->object;
       
       env->l=l;
       
  +    env->soName=env->globalPool->calloc(env, env->globalPool, strlen(file_name)+1);
  +    
  +    if( env->soName == NULL ){
  +        env->l->jkLog(env, env->l, JK_LOG_ERROR, "Error creating env->soName\n");
  +        return env;
  +    }
  +    strcpy(env->soName,file_name);
       /* We should make it relative to JK_HOME or absolute path.
          ap_server_root_relative(cmd->pool,opt); */
       
  
  
  

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

Reply via email to