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 2005/04/15 17:05:09 UTC

DO NOT REPLY [Bug 34475] New: - Problem with "//" in url

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=34475

           Summary: Problem with "//" in url
           Product: Tomcat 5
           Version: 5.0.28
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connector:AJP
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: a.iurlano@inera.it


I had a webapp running on a tomcat 5.0.28 and visible through the ajp/1.3
connector via apache
This webapp generates urls to itself with // in them. When it is configured to
access the tomcat via the http connector it works correctly, but when it is
configured to operate via the ajp connector, the url is not reached.
I've noticed that this webapps works correctly on mod_jk 1.2.5.
I've had this problem on mod_jk 1.2.10
Having spent all the day to debug this problem, I think I've figured where it hides.
The code in mod_jk.c uses ap_no2slash(clean_uri) to remove double slashes in
jk_translate(). I think this happens registering workers base url to be fetched
later at the time to forward the uris.
Adding an ap_no2slash() in /jk/native/common/jk_uri_worker_map.c seems to fix
the problem. I don't know if this is right, because I've got almost no knowledge
of jk or apache internals. But now it seems to be working. Here is a patch:

--- jk_uri_worker_map.c.old     2005-04-15 14:49:10.000000000 +0000
+++ jk_uri_worker_map.c 2005-04-15 11:05:23.000000000 +0000
@@ -454,6 +454,10 @@
     if (JK_IS_DEBUG_LEVEL(l))
         jk_log(l, JK_LOG_DEBUG, "Attempting to map URI '%s' from %d maps",
                uri, uw_map->size);
+    ap_no2slash(uri);
+    if (JK_IS_DEBUG_LEVEL(l))
+        jk_log(l, JK_LOG_DEBUG, "Attempting to map URI '%s' from %d maps",
+               uri, uw_map->size);
     for (i = 0; i < uw_map->size; i++) {
         uri_worker_record_t *uwr = uw_map->maps[i];

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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