Re: Problem with uriworkermap.properties

2007-07-20 Thread Rainer Jung
Could you please rerun your tests with log level debug for the
redirector and post the result from its log file? Thanks.

Eric B. schrieb:
 Hi,
 
 I'm running IIS with tomcat 5.5 and have the latest isapi_redirect.dll 
 (1.2.23) installed and running.
 The basic functionality is working well, but I am having trouble with 
 getting exclusion rules to work properly.
 
 I have the following in uriworkermap.properties:
 /*=worker
 !/*.htm=worker
 !/private/*=worker
 
 The following happens:
 All *.htm files (no matter what path) are served up by IIS and not Tomcat
 All other files are served by Tomcat
 All files in /private/* are also served by Tomcat
 
 I would have expected that the last exclusion (!/private/*) would mean that 
 the connector would ignore any requests to the /private/ path.
 
 Am I doing something wrong?
 
 Thanks for any help!  And if I am asking in the wrong group / list, please 
 let me know where I should direct my question.
 
 Thanks,
 
 Eric

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with uriworkermap.properties

2007-07-11 Thread Eric B.
Hi,

I'm running IIS with tomcat 5.5 and have the latest isapi_redirect.dll 
(1.2.23) installed and running.
The basic functionality is working well, but I am having trouble with 
getting exclusion rules to work properly.

I have the following in uriworkermap.properties:
/*=worker
!/*.htm=worker
!/private/*=worker

The following happens:
All *.htm files (no matter what path) are served up by IIS and not Tomcat
All other files are served by Tomcat
All files in /private/* are also served by Tomcat

I would have expected that the last exclusion (!/private/*) would mean that 
the connector would ignore any requests to the /private/ path.

Am I doing something wrong?

Thanks for any help!  And if I am asking in the wrong group / list, please 
let me know where I should direct my question.

Thanks,

Eric




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JK 1.2.19 IIS (Win Server 2003 R2) letter case problem in uriworkermap.properties

2006-10-31 Thread James Garrison
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.

Is this a known problem in JK?

-- 
James GarrisonAthens Group, Inc.
mailto:[EMAIL PROTECTED]5608 Parkcrest Dr
http://www.athensgroup.comAustin, TX 78731
SKYPE callto:jhg-athensgroup  (512) 345-0600 x150
PGP Key ID: 0x22E8DA2A


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JK 1.2.19 IIS (Win Server 2003 R2) letter case problem in uriworkermap.properties

2006-10-31 Thread Rainer Jung
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.

Thanks for reporting the problem.

Regards,

Rainer

James Garrison schrieb:
 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.
 
 Is this a known problem in JK?
 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JK 1.2.19 IIS (Win Server 2003 R2) letter case problem in uriworkermap.properties

2006-10-31 Thread James Garrison
A bug has been filed, as requested.  The workaround fixed the problem
for me.

Thanks for the quick response!

-- 
James GarrisonAthens Group, Inc.
mailto:[EMAIL PROTECTED]5608 Parkcrest Dr
http://www.athensgroup.comAustin, TX 78731
SKYPE callto:jhg-athensgroup  (512) 345-0600 x150
PGP Key ID: 0x22E8DA2A


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JK 1.2.19 IIS (Win Server 2003 R2) letter case problem in uriworkermap.properties

2006-10-31 Thread Rainer Jung
Hi James,

I committed a patch for the problem. If you are able to compile the
plugin, you can check out the file from subversion, or apply the
following patch to version 1.2.19. Check for split mail lines in the patch.

Regards,

Rainer

Index: native/common/jk_map.c
===
--- native/common/jk_map.c  (revision 439824)
+++ native/common/jk_map.c  (revision 469665)
@@ -35,17 +35,11 @@
 #define JK_MAP_REFERENCE(.reference)
 #define JK_MAP_REFERENCE_SZ (strlen(JK_MAP_REFERENCE))

-#ifdef AS400
-#define CASE_MASK 0xbfbfbfbf
-#else
-#define CASE_MASK 0xdfdfdfdf
-#endif
-
 /* Compute the checksum for a key, consisting of the first
- * 4 bytes, normalized for case-insensitivity and packed into
- * an int...this checksum allows us to do a single integer
+ * 4 bytes, packed into an int.
+ * This checksum allows us to do a single integer
  * comparison as a fast check to determine whether we can
- * skip a strcasecmp
+ * skip a strcmp
  */
 #define COMPUTE_KEY_CHECKSUM(key, checksum)\
 {  \
@@ -67,7 +61,6 @@
 c = (unsigned int)*++k;\
 checksum |= c; \
 }  \
-checksum = CASE_MASK; \
 }

 struct jk_map
@@ -342,7 +335,7 @@
 unsigned int key;
 COMPUTE_KEY_CHECKSUM(name, key)
 for (i = 0; i  m-size; i++) {
-if (m-keys[i] == key  strcasecmp(m-names[i], name) == 0) {
+if (m-keys[i] == key  strcmp(m-names[i], name) == 0) {
 break;
 }
 }
@@ -661,7 +654,7 @@
 *(to+remain)   = '.';
 *(to+remain+1) = '\0';

-rc = jk_map_resolve_references(m, m-values[i],
0, ++depth, l);
+rc = jk_map_resolve_references(m, m-values[i],
0, depth+1, l);
 if (rc == JK_FALSE) {
 break;
 }

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]