Quoting Mark Miesfeld <[EMAIL PROTECTED]>:

> I was just getting ready to post something saying the fix seems to
> break mod_jk2 altogether for me.

Interesting. I haven't actually checked explicit calls to pages with reversed
order and mod_jk 1.2.0, so I don't really know if that breaks it or not. Will
test tonight (Sydney time).

> For one thing, I think, if jk2_map_to_storage is invoked before
> jk2_translate then mod_jk2 is going to return DECLINED all the time.
> Which is what I am seeing.  Nothing gets sent over to tomcat.
> 
> For example:
> 
> jk2_map_to_storage( )         ENTER
>   Unparsed uri:               /tomcat/examples
>   request_rec:                009D79A8
>   Return DECLINED
> jk2_map_to_storage( )         ENTER
>   Unparsed uri:               /tomcat/examples/
>   request_rec:                009D79A8
>   Return DECLINED
> jk2_map_to_storage( )         ENTER
>   Unparsed uri:               /tomcat/examples/index.html
>   request_rec:                009D59A0
>   Return DECLINED
> jk2_map_to_storage( )         ENTER
>   Unparsed uri:               /tomcat/examples/index.jsp
>   request_rec:                009D59A0
>   Return DECLINED
> jk2_handler( )                ENTER
>   Unparsed uri:               /tomcat/examples/
>   request_rec:                009D79A8
>   uriEnv:                     00000000
>   Return DECLINED
> 
> In jk2_map_to_storage the start of the code is:
> 
>     jk_uriEnv_t *uriEnv=ap_get_module_config( r->request_config,
> &jk2_module );
> 
>     if( uriEnv != NULL ) {
> 
> but the only calls to
> 
>   ap_set_module_config( r->request_config, &jk2_module, uriEnv );
> 
> are in jk2_translate.
> 
> So, it seems to me that jk2_translate needs to be invoked before
> jk2_map_to_storage.  Which is what I thought the original order was.
> But I have to confess I really do not understand APR_HOOK_MIDDLE,
> APR_HOOK_FIRST, etc.

I don't really understand Apache all that well, but the API documentation talks
about 'Controlling hook calling order'. From 'Apache Hook Functions' document:
"...all modules using HOOK_FIRST will run before the HOOK_MIDDLE which are
before HOOK_LAST." If the order is unimportant, HOOK_MIDDLE is recommended.

> Anyhow, the bottom line is that on my machine doing a clean and then
> rebuilding tomcat and mod_jk2 using the latest
> jakarta-tomcat-connectors
> from cvs, leaves me with mod_jk2 not sending anything on to tomcat.

OK. I'll try your solution with mod_jk 1.2.0 and mod_jk2 people might do the
same. I don't really like my fix in 1.2.0 because it's just a cheap hack and it
doesn't address the root cause of the problem

The reason why it didn't work in mod_jk2 is the fact that the test was wrong. It
should have been:

-----------------------
if((uriEnv==NULL || strcmp(r->handler,JK_HANDLER)) &&
   strcmp(r->handler,DIR_MAGIC_TYPE)))
    return DECLINED;
-----------------------

But even that probably wouldn't work with TC 4.x because getServletPath() would
start returning strange things. I think your approach is much better.

Bojan

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to