DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38889>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38889

           Summary: mod_jk disregards configuration file order of JkMount
           Product: Tomcat 5
           Version: 5.5.15
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Native:JK
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


I've been trying out the new version of mod_jk (1.2.15) 

I've been working on upgrading our mod_jk from 1.2.9 to 1.2.15.  (We
use mod_jk primarily on Linux, in conjunction with apache 2.0.53 and
tomcat 5.5.15).

During testing, I noticed several cases of JkMount mappings going to
the wrong set of workers.  By `wrong', I mean `not the same workers as
1.2.9 would have chosen'; this behavior is reproducible with both the
apache 1.3 and 2.0 versions of mod_jk

Here is an example:

  Given JkMount directives:

  JkMount /k/*     worker_k
  JkMount /s/*     worker_s
  JkMount /m/*     worker_m
  JkMount /h/*     worker_h
  JkMount /*.jsp   worker_default

These mount points effectively represent 5 different applications
under a single VirtualHost; and they're handled by 5 different groups
of tomcats.


I'll make a request for the uri "/this-uri-wont-match". Here is the
portion of JkLogFile that attempts matching:


  [Tue Mar 07 16:20:40 2006] [16809:0000] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): 
Attempting to map URI '/this-uri-wont-match' from 5 maps
  [Tue Mar 07 16:20:40 2006] [16809:0000] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (461): 
Attempting to map context URI '/*.jsp'
  [Tue Mar 07 16:20:40 2006] [16809:0000] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (461): 
Attempting to map context URI '/k/*'
  [Tue Mar 07 16:20:40 2006] [16809:0000] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (461): 
Attempting to map context URI '/s/*'
  [Tue Mar 07 16:20:40 2006] [16809:0000] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (461): 
Attempting to map context URI '/m/*'
  [Tue Mar 07 16:20:40 2006] [16809:0000] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (461): 
Attempting to map context URI '/h/*'


I see that the code is attempting a `longest-pattern-first' match.
However, the side effect of this is uri's like

  /m/some.jsp
  /h/some-other.jsp
  /s/yet-another.jsp
      ....

become unreachable.  Because mod_jk 1.2.15 uses pattern length, and
not *configuration file* order, there are circumstances where it will
never match the desired servlet container.


Commenting out the call to worker_qsort() (line 297 of
jk_uri_worker_map.c -- diff attached) makes the issue go away.


Would it be possible to go back to matching based on configuration
file order?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to