danmil 01/01/22 19:23:03
Modified: src/native/mod_jk/common jk_uri_worker_map.c
Log:
Adding more thorough DEBUG-level to describe what mapping the module is
using for a given request.
Submitted by: James Courtney
Revision Changes Path
1.3 +18 -6 jakarta-tomcat/src/native/mod_jk/common/jk_uri_worker_map.c
Index: jk_uri_worker_map.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/common/jk_uri_worker_map.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jk_uri_worker_map.c 2000/11/10 18:48:50 1.2
+++ jk_uri_worker_map.c 2001/01/23 03:23:03 1.3
@@ -65,7 +65,7 @@
* servlet container. *
* *
* Author: Gal Shachor <[EMAIL PROTECTED]> *
- * Version: $Revision: 1.2 $ *
+ * Version: $Revision: 1.3 $ *
***************************************************************************/
#include "jk_pool.h"
@@ -358,6 +358,7 @@
uri = clean_uri;
}
+ jk_log(l, JK_LOG_DEBUG, "Attempting to map URI %s\n", uri);
for(i = 0 ; i < uw_map->size ; i++) {
if(uw_map->maps[i].ctxt_len < longest_match) {
@@ -369,10 +370,20 @@
uw_map->maps[i].ctxt_len)) {
if(MATCH_TYPE_EXACT == uw_map->maps[i].match_type) {
if(strlen(uri) == uw_map->maps[i].ctxt_len) {
+ jk_log(l,
+ JK_LOG_DEBUG,
+ "jk_uri_worker_map_t::map_uri_to_worker, Found an exact
match %s ->%s\n",
+ uw_map->maps[i].worker_name,
+ uw_map->maps[i].context );
return uw_map->maps[i].worker_name;
}
} else if(MATCH_TYPE_CONTEXT == uw_map->maps[i].match_type) {
if(uw_map->maps[i].ctxt_len > longest_match) {
+ jk_log(l,
+ JK_LOG_DEBUG,
+ "jk_uri_worker_map_t::map_uri_to_worker, Found a
context match %s -> %s\n",
+ uw_map->maps[i].worker_name,
+ uw_map->maps[i].context );
longest_match = uw_map->maps[i].ctxt_len;
best_match = i;
}
@@ -393,6 +404,11 @@
if(0 == strcmp(suffix, uw_map->maps[i].suffix)) {
#endif
if(uw_map->maps[i].ctxt_len >= longest_match) {
+ jk_log(l,
+ JK_LOG_DEBUG,
+ "jk_uri_worker_map_t::map_uri_to_worker, Found
a suffix match %s -> *.%s\n",
+ uw_map->maps[i].worker_name,
+ uw_map->maps[i].suffix );
longest_match = uw_map->maps[i].ctxt_len;
best_match = i;
}
@@ -403,10 +419,6 @@
}
if(-1 != best_match) {
- jk_log(l, JK_LOG_DEBUG,
- "jk_uri_worker_map_t::map_uri_to_worker, Found a match %s\n",
- uw_map->maps[best_match].worker_name);
-
return uw_map->maps[best_match].worker_name;
} else {
/*
@@ -435,4 +447,4 @@
"jk_uri_worker_map_t::map_uri_to_worker, done without a match\n");
return NULL;
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]