tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13040] - can't retrieve external context who's uri is a sub-dir of current context
Date Wed, 30 Oct 2002 16:41:55 GMT
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=13040>.
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=13040

can't retrieve external context who's uri is a sub-dir of current context





------- Additional Comments From puckman@taglab.com  2002-10-30 16:41 -------
That System.out should of course not be there.

--- ApplicationContext.java-2002-10-21  Mon Sep 23 11:23:16 2002
+++ ApplicationContext.java     Wed Oct 30 16:40:08 2002
@@ -439,12 +439,11 @@
             return (null);

         // Return the current context if requested
-        String contextPath = context.getPath();
-        if (!contextPath.endsWith("/"))
-            contextPath = contextPath + "/";
-        if ((contextPath.length() > 0) && (uri.startsWith(contextPath))) {
-            return (this);
-        }
+       String contextPath = context.getPath();
+       if ( contextPath.equals( "" ) && uri.equals( "/" ) ||
+            !contextPath.equals( "" ) && uri.equals( contextPath ) ) {
+         return (this);
+       }

         // Return other contexts only if allowed
         if (!context.getCrossContext())

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


Mime
View raw message