mturk 2002/09/26 05:29:17 Modified: jk/native2/common jk_uriMap.c jk_uriEnv.c Log: Fix the prefixMap leaving the trailing slash with the prefix. Revision Changes Path 1.45 +2 -2 jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c Index: jk_uriMap.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- jk_uriMap.c 25 Sep 2002 14:42:51 -0000 1.44 +++ jk_uriMap.c 26 Sep 2002 12:29:17 -0000 1.45 @@ -171,7 +171,7 @@ if (uriLen < uwr->prefix_len) continue; if (strncmp(uri, uwr->prefix, uwr->prefix_len) == 0) { - if (uwr->prefix_len >best_match) { + if (uwr->prefix_len > best_match) { best_match=uwr->prefix_len; match=uwr; } @@ -571,7 +571,7 @@ /* Then prefix match */ match = jk2_uriMap_prefixMap(env, uriMap, ctxEnv->prefixMatch, uri, uriLen); if (match != NULL) { - char c = uri[match->prefix_len]; + char c = uri[match->prefix_len - 1]; /* XXX Filter prefix matches to allow only exact matches with an optional path_info or query string at end. Fixes Bugzilla#12141, needs review.. 1.33 +5 -4 jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c Index: jk_uriEnv.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- jk_uriEnv.c 26 Sep 2002 10:26:33 -0000 1.32 +++ jk_uriEnv.c 26 Sep 2002 12:29:17 -0000 1.33 @@ -125,7 +125,6 @@ char *uri = NULL; char *colon; char host[1024]; - char path[1024]; strcpy(host, name); colon = strchr(host, ':'); @@ -147,7 +146,6 @@ uriEnv->virtual = uriEnv->pool->pstrdup(env, uriEnv->pool, host); return JK_OK; } - strcpy(path, uri); if (colon) { *uri = '\0'; uriEnv->port = atoi(colon); @@ -159,8 +157,9 @@ } else uriEnv->virtual = "*"; - uriEnv->uri = uriEnv->pool->pstrdup(env, uriEnv->pool, path); - + *uri = '/'; + uriEnv->uri = uriEnv->pool->pstrdup(env, uriEnv->pool, uri); + return JK_OK; } #endif /* HAS_APR */ @@ -398,7 +397,9 @@ } else { /* context based /context/prefix/ASTERISK */ asterisk[1] = '\0'; +#if 0 asterisk[0] = '\0'; /* Remove the extra '/' */ +#endif uriEnv->suffix = NULL; uriEnv->prefix = uri; uriEnv->prefix_len =strlen( uriEnv->prefix );
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>