tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_uriEnv.c
Date Wed, 02 Oct 2002 09:45:02 GMT
mturk       2002/10/02 02:45:02

  Modified:    jk/native2/common jk_uriEnv.c
  Log:
  Remove the APR code from the uriEnv.
  
  Revision  Changes    Path
  1.34      +7 -52     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.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- jk_uriEnv.c	26 Sep 2002 12:29:17 -0000	1.33
  +++ jk_uriEnv.c	2 Oct 2002 09:45:02 -0000	1.34
  @@ -69,8 +69,6 @@
   #include "jk_uriMap.h"
   #include "jk_registry.h"
   
  -#ifdef HAS_APR
  -#include "apr_uri.h"
   /** Parse the name:
          VHOST/PATH
   
  @@ -82,46 +80,6 @@
   static int jk2_uriEnv_parseName( jk_env_t *env, jk_uriEnv_t *uriEnv,
                                    char *name)
   {
  -
  -    apr_uri_t uri;
  -    char s[1024];
  -
  -    /* If it uri starts with / then it is simple 
  -     * default host uri
  -     */
  -    if (*name == '/')
  -        strcpy(s, name);
  -    else {
  -        strcpy(s, "http://");
  -        strcat(s, name);
  -    }
  -    env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  -                  "uriEnv.parseName() uri %s name %s real %s\n", 
  -                  uriEnv->name, name, s);
  -    
  -    if (apr_uri_parse(uriEnv->pool->_private, s, &uri) == APR_SUCCESS) {
  -        
  -        uriEnv->port = uri.port;
  -        if (uri.hostname) {
  -            if (!uriEnv->port)
  -                uriEnv->virtual = uri.hostname;
  -            else
  -                uriEnv->virtual = apr_pstrcat(uriEnv->pool->_private,
  -                                    uri.hostname, ":", uri.port_str, NULL);
  -        }
  -        else
  -            uriEnv->virtual = "*";
  -        uriEnv->uri = uri.path;
  -        if (!uri.path)
  -            uriEnv->match_type = MATCH_TYPE_HOST;
  -        return JK_OK;
  -    }
  -    return JK_ERR;
  -}
  -#else
  -static int jk2_uriEnv_parseName( jk_env_t *env, jk_uriEnv_t *uriEnv,
  -                                 char *name)
  -{
       char *uri = NULL;
       char *colon;
       char host[1024];
  @@ -162,7 +120,6 @@
   
       return JK_OK;
   }
  -#endif /* HAS_APR */
   
   
   static void * JK_METHOD jk2_uriEnv_getAttribute(jk_env_t *env, jk_bean_t *bean,
  @@ -397,18 +354,16 @@
           } else {
               /* context based /context/prefix/ASTERISK  */
               asterisk[1]      = '\0';
  -#if 0
  -            asterisk[0]      = '\0'; /* Remove the extra '/' */
  -#endif
  +
               uriEnv->suffix      = NULL;
               uriEnv->prefix      = uri;
               uriEnv->prefix_len  =strlen( uriEnv->prefix );
  -            uriEnv->match_type  = MATCH_TYPE_PREFIX;
  -            if( uriEnv->mbean->debug > 0 ) {
  -                env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  -                              "uriEnv.init() prefix mapping %s=%s\n",
  -                              uriEnv->prefix, uriEnv->workerName);
  -            }
  +            uriEnv->match_type  = MATCH_TYPE_PREFIX;
  +            if( uriEnv->mbean->debug > 0 ) {
  +                env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  +                              "uriEnv.init() prefix mapping %s=%s\n",
  +                              uriEnv->prefix, uriEnv->workerName);
  +            }
           }
       } else {
           /* Something like : JkMount /servlets/exampl* ajp13 */
  
  
  

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


Mime
View raw message