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/server/apache13 mod_jk2.c
Date Wed, 25 Sep 2002 08:11:10 GMT
mturk       2002/09/25 01:11:10

  Modified:    jk/native2/server/apache13 mod_jk2.c
  Log:
  Add the same uriMap parsing as on Apache2 using
  hostname and port for virtual hosts.
  
  Revision  Changes    Path
  1.21      +26 -2     jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c
  
  Index: mod_jk2.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_jk2.c	23 Sep 2002 17:41:43 -0000	1.20
  +++ mod_jk2.c	25 Sep 2002 08:11:10 -0000	1.21
  @@ -87,6 +87,11 @@
   #include "jk_uriMap.h"
   #include "jk_requtil.h"
   
  +#ifdef WIN32
  +static char  file_name[_MAX_PATH];
  +#endif
  +
  +
   #define JK_HANDLER          ("jakarta-servlet2")
   #define JK_MAGIC_TYPE       ("application/x-jakarta-servlet2")
   
  @@ -144,6 +149,7 @@
       jk_bean_t *jkb;
   
   #ifdef HAS_APR
  +	apr_initialize();
       apr_pool_create( &jk_globalPool, NULL );
   
       jk2_pool_apr_create( NULL, &globalPool, NULL, jk_globalPool );
  @@ -426,6 +432,7 @@
   {
       jk_uriEnv_t *uriEnv;
       jk_env_t *env;
  +    int port;
               
       if(r->proxyreq) {
           return DECLINED;
  @@ -438,7 +445,13 @@
       /* get_env() */
       env = workerEnv->globalEnv->getEnv( workerEnv->globalEnv );
           
  -    uriEnv = workerEnv->uriMap->mapUri(env, workerEnv->uriMap,NULL, 0,r->uri
);
  +    port = ap_get_server_port(r);
  +    if (ap_is_default_port(port, r))
  +        port = 0;
  +    uriEnv = workerEnv->uriMap->mapUri(env, workerEnv->uriMap,
  +                r->server->is_virtual ? ap_get_server_name(r) : NULL,
  +                port,
  +                r->uri);
       
       if(uriEnv==NULL || uriEnv->workerName==NULL) {
           workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env );
  @@ -498,3 +511,14 @@
   
   };
   
  +#ifdef WIN32
  +
  +BOOL WINAPI DllMain(HINSTANCE hInst,        // Instance Handle of the DLL
  +                    ULONG ulReason,         // Reason why NT called this DLL
  +                    LPVOID lpReserved)      // Reserved parameter for future use
  +{
  +    GetModuleFileName( hInst, file_name, sizeof(file_name));
  +    return TRUE;
  +}
  +
  +#endif
  
  
  

--
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