You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/10/09 23:37:05 UTC

DO NOT REPLY [Bug 23710] New: - Incorrect mapping behavior in IIS Jk plugin (jk 1.2.5)

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23710

Incorrect mapping behavior in IIS Jk plugin (jk 1.2.5)

           Summary: Incorrect mapping behavior in IIS Jk plugin (jk 1.2.5)
           Product: Tomcat 4
           Version: 4.1.28
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Connector:JK/AJP (deprecated)
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: mark@tweakt.net


Due to a bug in Rev 1.19 of jk_isapi_plugin.c path mappings are not correctly
mapped from IIS to tomcat.

uriworkermap.properties:
/servlet/* = local

jk_isapi_plugin.c tries to support virtual host mapping entries in uriworkermap
by pre-pending the hostname as a directory, to the pattern.

Ex: "/test1.imarketinc.com/servlet/*"

If that pattern does not match, it is supposed to then try without the
hostname... (the log message "In HttpFilterProc test Default redirection...").

jk 1.2.5, jk_isapi_plugin.c introduced a bug, which causes the default check to
never happen. Below is the relevant log output, you can see that the default
pattern is never checked for a match. To compound the problem, the log message
is now incorrect, and logs the wrong variable (says one thing, but does another).

mod_jk.log (debug level):
[Thu Oct 09 15:58:00 2003]  [jk_isapi_plugin.c (655)]: Detected IIS >= 5.0
[Thu Oct 09 15:58:00 2003]  [jk_isapi_plugin.c (696)]: HttpFilterProc started
[Thu Oct 09 15:58:00 2003]  [jk_isapi_plugin.c (759)]: In HttpFilterProc Virtual
Host redirection of /test1.zapdata.com/servlet/TestServlet
[Thu Oct 09 15:58:00 2003]  [jk_isapi_plugin.c (766)]: In HttpFilterProc test
Default redirection of /servlet/TestServlet
[Thu Oct 09 15:58:00 2003]  [jk_uri_worker_map.c (486)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Thu Oct 09 15:58:00 2003]  [jk_uri_worker_map.c (500)]: Attempting to map URI
'/test1.zapdata.com/servlet/TestServlet'
[Thu Oct 09 15:58:00 2003]  [jk_uri_worker_map.c (618)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Thu Oct 09 15:58:00 2003]  [jk_isapi_plugin.c (830)]: HttpFilterProc
[/servlet/TestServlet] is not a servlet url


Here is the relevent block of code:

            if (szHost > 0) {
                strcat(snuri,Host);
                strcat(snuri,uri);
                jk_log(logger, JK_LOG_DEBUG, 
                       "In HttpFilterProc Virtual Host redirection of %s\n", 
                       snuri);
            } else {
	      strncpy(snuri, uri, sizeof(snuri));
	    }
            if (!worker) {
                jk_log(logger, JK_LOG_DEBUG, 
                       "In HttpFilterProc test Default redirection of %s\n", 
                       uri);
                worker = map_uri_to_worker(uw_map, snuri, logger);
            }

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org