You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Henri Gomez <hg...@apache.org> on 2004/03/03 12:24:32 UTC

Re: mod_jk / mod_jk2 : help from specialists welcome

Justin Erenkrantz wrote:

> --On Wednesday, March 3, 2004 10:16 AM +0100 jean-frederic clere 
> <jf...@fujitsu-siemens.com> 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 ?


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


Re: mod_jk / mod_jk2 : help from specialists welcome

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Henri Gomez wrote:
> Justin Erenkrantz wrote:
> 
>> --On Wednesday, March 3, 2004 12:24 PM +0100 Henri Gomez
>> <hg...@apache.org> 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.
> 
> 

And now mod_dav off httpd-2.1 tells:
+++
[Thu Mar 04 18:45:18 2004] [crit] [client 172.25.182.35] configuration error:
couldn't check access.  No groups file?: /examples/jsp-source/
+++

I have in httpd.conf:
+++
  <Location /examples/jsp-source>
    Dav On

    AuthType Basic
    AuthName DAV
    AuthUserFile user.passwd
    AuthGroupFile user.group

    # ForceType text/plain

    <LimitExcept GET OPTIONS>
      #require user admin
      Require valid-user
    </LimitExcept>
  </Location>
+++
Is there something wrong in my configuration?

Cheers

Jean-Frederic


Re: mod_jk / mod_jk2 : help from specialists welcome

Posted by Henri Gomez <hg...@apache.org>.
Justin Erenkrantz wrote:

> --On Wednesday, March 3, 2004 12:24 PM +0100 Henri Gomez 
> <hg...@apache.org> 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

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Wednesday, March 3, 2004 12:24 PM +0100 Henri Gomez <hg...@apache.org> 
wrote:

> To resume you :
>
> - remove translate
>
> - move translate code to map_storage
>
> Did I understand correctly ?

Yes, I think that'll work.  -- justin