Bug 40855 - JK 1.2.19 letter case problem in uriworkermap
Summary: JK 1.2.19 letter case problem in uriworkermap
Status: CLOSED DUPLICATE of bug 40856
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: Common (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-31 13:24 UTC by Jim Garrison
Modified: 2008-10-05 03:09 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Garrison 2006-10-31 13:24:14 UTC
With JK 1.2.19 installed on Windows Server 2003 R2, and
given the following in uriworkermap.properties:

/Autoweb=perseus9010
/Autoweb/*=perseus9010
/autoweb=perseus9010
/autoweb/*=perseus9010

Requests are handled as follows:

/Autoweb  --> tomcat --> redirect to /Autoweb/
/Autoweb/ --> tomcat --> redirect to /Autoweb/index.html

This is operating correctly.  But:

/autoweb  --> tomcat --> redirect to /autoweb/
/autoweb/ --> IIS returns 404 (request NOT sent to tomcat)

with an explicit request to /autoweb/index.html IIS also
returns 404 without attempting to send the request to tomcat
via JK. 

What is most interesting is that reversing the uriworkermap
entries so the /autoweb lines come first reverses the
behavior.  I.e. with

/autoweb=perseus9010
/autoweb/*=perseus9010
/Autoweb=perseus9010
/Autoweb/*=perseus9010

IIS now serves /autoweb correctly but /Autoweb breaks.

*************** 

Rainer Jung replied to my posting on the user mailing list as follows:

It was not knwon (at least not to me) before your mail, but you are
right. We changed URL case sensitivity for mod_jk 1.2.19, because URLs
should be case sensitive, but we missed one place.

Could you please open a bug in bugzilla,

http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205

so that we can track the problem more easily? The bug applies to mod_jk
on all platforms and for all web server types. If multiple mount
patterns are equal except for the case, only the first url pattern will
be made active, but with the target worker of the last pattern.

Here's a workaround for your configuration:

/Autoweb=perseus9010
/Autoweb/*=perseus9010
/autoweb|/*=perseus9010

The keys on the left side are used in a case insensitive way as a key in
a hash table. If there are multiple same keys, the first key wins and
the value is set to the last one.

Since mod_jk 1.2.19 there is a convenience notation to combine
/something and /something/*. You can simple write /something|/* which
gets internally resolved as both patterns. Fortunately the hash table is
build early, so that this counts as a different key. It's only a
workaround! We'll fix the bug for the next release.
Comment 1 Rainer Jung 2006-10-31 14:38:06 UTC
I already opened a bugzilla by myself, because the automatic mailing of all
issues to tomcat-dev doesn't seem to work at the moment.

Problem should be fixed in revision 469665, which will be part of release 1.2.20. 

*** This bug has been marked as a duplicate of 40856 ***
Comment 2 Rainer Jung 2008-01-01 17:03:44 UTC
Move a couple of fixed JK issues from resolved to closed.