bojan 2002/07/23 17:44:20 Modified: jk/native2/server/apache2 mod_jk2.c Log: Kick out DIR_MAGIC_TYPE from jk2_handler() since it is never given to it anyway. This will have to be resolved later for mod_jk2. Make sure main request gets the appropriate info when the sub-request is made from mod_dir. This makes DirectoryIndex work (finally :-) for mod_jk2. Revision Changes Path 1.46 +15 -17 jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c Index: mod_jk2.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- mod_jk2.c 22 Jul 2002 23:18:38 -0000 1.45 +++ mod_jk2.c 24 Jul 2002 00:44:20 -0000 1.46 @@ -532,13 +532,8 @@ uriEnv=ap_get_module_config( r->request_config, &jk2_module ); - /* We do DIR_MAGIC_TYPE here to make sure TC gets all requests, even - * if they are directory requests, in case there are no static files - * visible to Apache and/or DirectoryIndex was not used */ - /* not for me, try next handler */ - if((uriEnv==NULL || strcmp(r->handler,JK_HANDLER)) && - strcmp(r->handler,DIR_MAGIC_TYPE)) + if(uriEnv==NULL || strcmp(r->handler,JK_HANDLER)) return DECLINED; /* If this is a proxy request, we'll notify an error */ @@ -546,17 +541,6 @@ return HTTP_INTERNAL_SERVER_ERROR; } - /* This is needed for DIR_MAGIC_TYPE. Not sure if this is good, bad or just - * plain ugly, but we really NEED to have uriEnv, otherwise everything else - * will blow up */ - - if(uriEnv == NULL){ - uriEnv = ap_get_module_config(r->server->module_config, &jk2_module); - - if(uriEnv == NULL) /* We still have nothing, go out */ - return DECLINED; - } - workerEnv = uriEnv->workerEnv; /* Get an env instance */ @@ -678,6 +662,13 @@ ap_set_module_config( r->request_config, &jk2_module, uriEnv ); r->handler=JK_HANDLER; workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env ); + + /* This could be a sub-request, possibly from mod_dir */ + if(r->main){ + ap_set_module_config( r->main->request_config, &jk2_module, uriEnv ); + r->main->handler=JK_HANDLER; + } + return OK; } @@ -707,12 +698,19 @@ ap_set_module_config( r->request_config, &jk2_module, uriEnv ); r->handler=JK_HANDLER; + /* This could be a sub-request, possibly from mod_dir */ + if(r->main){ + ap_set_module_config( r->main->request_config, &jk2_module, uriEnv ); + r->main->handler=JK_HANDLER; + } + if( uriEnv->mbean->debug > 0 ) env->l->jkLog(env, env->l, JK_LOG_DEBUG, "mod_jk.translate(): uriMap %s %s %#lx\n", r->uri, uriEnv->workerName, uriEnv->worker); workerEnv->globalEnv->releaseEnv( workerEnv->globalEnv, env ); + return OK; }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>