Re: mod_jk / mod_jk2 : help from specialists welcome
Justin Erenkrantz wrote: --On Wednesday, March 3, 2004 12:24 PM +0100 Henri Gomez [EMAIL PROTECTED] wrote: To resume you : - remove translate - move translate code to map_storage Did I understand correctly ? Yes, I think that'll work. -- justin Ok, Jean-Frederic is working on what you suggest, but still have problems : jfclere 2004/03/03 09:55:32 Modified:jk/native2/server/apache2 mod_jk2.c Log: Remove jk2_translate... It is still not 100% OK: - LocationMatch does not work. - Some _not_found ends in Tomcat when using mod_dav.
Re: mod_jk / mod_jk2 : help from specialists welcome
--On Tuesday, March 2, 2004 8:55 PM +0100 Henri Gomez [EMAIL PROTECTED] wrote: What do you think of it ? MIDDLE or FIRST but after mod_rewrite ? All told, I think FIRST but after mod_rewrite (which is also a FIRST hook) is okay. This would likely make mod_jk be the second hook to run. mod_jk may want to be really early in the translate name hook phase to allow other modules to leverage what it does. Well, if it works, that is. ;-) It'd most definitely want to be after mod_rewrite... Do you have a specific problem? -- justin
Re: mod_jk / mod_jk2 : help from specialists welcome
Henri Gomez wrote: Hi to all, I'm involved in jk/jk2 on tomcat and we wonder on tomcat-dev if we should use translate in MIDDLE or FIRST position (specifying that mod_rewrite to be the first in hooks chain). I see in jk that we're using : ap_hook_translate_name(jk_translate,NULL,NULL,APR_HOOK_MIDDLE); and now in jk2 : static const char * const aszPre[] = { mod_rewrite.c, NULL }; ap_hook_translate_name(jk2_translate, aszPre, NULL, APR_HOOK_FIRST); What do you think of it ? MIDDLE or FIRST but after mod_rewrite ? Thanks for your help and advices !!! MIDDLE helps to fix 21546... But I do not see why ;-( signature.asc Description: OpenPGP digital signature
Re: mod_jk / mod_jk2 : help from specialists welcome
--On Wednesday, March 3, 2004 10:16 AM +0100 jean-frederic clere [EMAIL PROTECTED] wrote: MIDDLE helps to fix 21546... But I do not see why ;-( Oh, *now* I understand the context to Henri's question. Here's a suggestion. And, no, I don't think changing the priority to MIDDLE (or LAST) will solve the problem either. I think you want to remove the translate_name hook entirely and fold that functionality into the map_to_storage hook. mod_jk isn't translating or modifying r-filename, but instead mapping the path (as determined by all of the other modules) to storage. At the point when translate_name is called, we don't have any idea what path the JSP is going to be at. PR 21546 is causing a problem because mod_jk2 is interfering with the other modules from performing their translation of r-filename. I think the missing module in J-F Clere's analysis of 21546 is mod_alias. mod_alias also has a MIDDLE translate name hook. So, if you switch mod_jk2 to MIDDLE, mod_alias's hook would run before mod_jk2's translate name hook. Since translate_name is a RUN_FIRST hook, it then won't execute mod_jk2's translate name hook. Yet, this would allow mod_dav to operate properly on non-GET/POST requests as the filename will be the 'correct' one which is resolvable by mod_dav_fs. But, what happens when mod_jk's translate hook doesn't run but the Alias hook does? As I read the mod_jk2 code, I don't see how the uriEnv will be setup properly in the r-request_config vector. I have a hunch that mod_jk2 will subsequently pass on all requests when an Alias in effect for that location space if you use MIDDLE for mod_jk2. That's bad. By moving the code currently in mod_jk2's translate_name to the map_to_storage looks like the correct solution to me. My hunch is that should work then... HTH. -- justin
Re: mod_jk / mod_jk2 : help from specialists welcome
Justin Erenkrantz wrote: --On Wednesday, March 3, 2004 10:16 AM +0100 jean-frederic clere [EMAIL PROTECTED] wrote: MIDDLE helps to fix 21546... But I do not see why ;-( Oh, *now* I understand the context to Henri's question. Here's a suggestion. And, no, I don't think changing the priority to MIDDLE (or LAST) will solve the problem either. I think you want to remove the translate_name hook entirely and fold that functionality into the map_to_storage hook. mod_jk isn't translating or modifying r-filename, but instead mapping the path (as determined by all of the other modules) to storage. At the point when translate_name is called, we don't have any idea what path the JSP is going to be at. PR 21546 is causing a problem because mod_jk2 is interfering with the other modules from performing their translation of r-filename. I think the missing module in J-F Clere's analysis of 21546 is mod_alias. mod_alias also has a MIDDLE translate name hook. So, if you switch mod_jk2 to MIDDLE, mod_alias's hook would run before mod_jk2's translate name hook. Since translate_name is a RUN_FIRST hook, it then won't execute mod_jk2's translate name hook. Yet, this would allow mod_dav to operate properly on non-GET/POST requests as the filename will be the 'correct' one which is resolvable by mod_dav_fs. But, what happens when mod_jk's translate hook doesn't run but the Alias hook does? As I read the mod_jk2 code, I don't see how the uriEnv will be setup properly in the r-request_config vector. I have a hunch that mod_jk2 will subsequently pass on all requests when an Alias in effect for that location space if you use MIDDLE for mod_jk2. That's bad. Very bad!: +++ [Wed Mar 03 12:09:04 2004] [error] [client 172.25.182.35] File does not exist: /examples [Wed Mar 03 12:09:05 2004] [notice] child pid 5865 exit signal Segmentation fault (11), possible coredump in /home/apache20/apache20 +++ I have just add: Alias /myniceexamples /examples in httpd.conf that has the mod_jk2 directive: +++ Location /examples JkUriSet worker ajp13:localhost:8009 /Location +++ By moving the code currently in mod_jk2's translate_name to the map_to_storage looks like the correct solution to me. My hunch is that should work then... HTH. -- justin signature.asc Description: OpenPGP digital signature
Re: mod_jk / mod_jk2 : help from specialists welcome
Justin Erenkrantz wrote: --On Wednesday, March 3, 2004 10:16 AM +0100 jean-frederic clere [EMAIL PROTECTED] wrote: MIDDLE helps to fix 21546... But I do not see why ;-( Oh, *now* I understand the context to Henri's question. Here's a suggestion. And, no, I don't think changing the priority to MIDDLE (or LAST) will solve the problem either. I think you want to remove the translate_name hook entirely and fold that functionality into the map_to_storage hook. mod_jk isn't translating or modifying r-filename, but instead mapping the path (as determined by all of the other modules) to storage. At the point when translate_name is called, we don't have any idea what path the JSP is going to be at. PR 21546 is causing a problem because mod_jk2 is interfering with the other modules from performing their translation of r-filename. I think the missing module in J-F Clere's analysis of 21546 is mod_alias. mod_alias also has a MIDDLE translate name hook. So, if you switch mod_jk2 to MIDDLE, mod_alias's hook would run before mod_jk2's translate name hook. Since translate_name is a RUN_FIRST hook, it then won't execute mod_jk2's translate name hook. Yet, this would allow mod_dav to operate properly on non-GET/POST requests as the filename will be the 'correct' one which is resolvable by mod_dav_fs. But, what happens when mod_jk's translate hook doesn't run but the Alias hook does? As I read the mod_jk2 code, I don't see how the uriEnv will be setup properly in the r-request_config vector. I have a hunch that mod_jk2 will subsequently pass on all requests when an Alias in effect for that location space if you use MIDDLE for mod_jk2. That's bad. By moving the code currently in mod_jk2's translate_name to the map_to_storage looks like the correct solution to me. My hunch is that should work then... Thanks Justin, great analysis, I'll take a look at this. To resume you : - remove translate - move translate code to map_storage Did I understand correctly ?
Re: mod_jk / mod_jk2 : help from specialists welcome
--On Wednesday, March 3, 2004 12:24 PM +0100 Henri Gomez [EMAIL PROTECTED] wrote: To resume you : - remove translate - move translate code to map_storage Did I understand correctly ? Yes, I think that'll work. -- justin
mod_jk / mod_jk2 : help from specialists welcome
Hi to all, I'm involved in jk/jk2 on tomcat and we wonder on tomcat-dev if we should use translate in MIDDLE or FIRST position (specifying that mod_rewrite to be the first in hooks chain). I see in jk that we're using : ap_hook_translate_name(jk_translate,NULL,NULL,APR_HOOK_MIDDLE); and now in jk2 : static const char * const aszPre[] = { mod_rewrite.c, NULL }; ap_hook_translate_name(jk2_translate, aszPre, NULL, APR_HOOK_FIRST); What do you think of it ? MIDDLE or FIRST but after mod_rewrite ? Thanks for your help and advices !!!