mturk       2003/03/15 04:34:39

  Modified:    jk/native2/common jk_uriEnv.c
  Log:
  Make the regular expression uri maps finally working.
  
  Revision  Changes    Path
  1.46      +17 -0     jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c
  
  Index: jk_uriEnv.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- jk_uriEnv.c       15 Mar 2003 11:16:54 -0000      1.45
  +++ jk_uriEnv.c       15 Mar 2003 12:34:39 -0000      1.46
  @@ -90,13 +90,30 @@
       int pcre = 0;
   
       if (*name == '$') {
  +#ifdef HAS_PCRE
           ++name;
           uriEnv->uri = uriEnv->pool->pstrdup(env, uriEnv->pool, name);
           uriEnv->match_type = MATCH_TYPE_REGEXP;
           env->l->jkLog(env, env->l, JK_LOG_INFO,
                       "uriEnv.parseName() parsing %s regexp\n",
                       name);
  +        {
  +            regex_t *preg = (regex_t *)uriEnv->pool->calloc( env, uriEnv->pool, 
sizeof(regex_t));
  +            if (regcomp(preg, uriEnv->uri, REG_EXTENDED)) {
  +                env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  +                              "uriEnv.parseName() error compiling regexp %s\n",
  +                              uri);
  +                return JK_ERR;
  +            }
  +            uriEnv->regexp = preg;
  +        }
           return JK_OK;
  +#else
  +        env->l->jkLog(env, env->l, JK_LOG_INFO,
  +                    "uriEnv.parseName() parsing regexp %s not supported\n",
  +                    uri);
  +        return JK_ERR;
  +#endif
       }
   
       strcpy(host, name);
  
  
  

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

Reply via email to