tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core ApplicationContext.java
Date Wed, 24 Apr 2002 08:39:53 GMT
remm        02/04/24 01:39:53

  Modified:    catalina/src/share/org/apache/catalina/core
                        ApplicationContext.java
  Log:
  - Fixes bug 6662.
  - The problem was that, given two context "/foo" and "/foobar", doing
    ServletContext.getContext("/foobar") in context "/foo" would have returned
    context "/foo" instead of context "/foobar" because of the "startsWith" test.
    Now, the test is an equals.
  - This needs some testing, but the change looks safe.
  
  Revision  Changes    Path
  1.36      +5 -6      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
  
  Index: ApplicationContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- ApplicationContext.java	27 Feb 2002 19:16:16 -0000	1.35
  +++ ApplicationContext.java	24 Apr 2002 08:39:53 -0000	1.36
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
1.35 2002/02/27 19:16:16 remm Exp $
  - * $Revision: 1.35 $
  - * $Date: 2002/02/27 19:16:16 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
1.36 2002/04/24 08:39:53 remm Exp $
  + * $Revision: 1.36 $
  + * $Date: 2002/04/24 08:39:53 $
    *
    * ====================================================================
    *
  @@ -114,7 +114,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.35 $ $Date: 2002/02/27 19:16:16 $
  + * @version $Revision: 1.36 $ $Date: 2002/04/24 08:39:53 $
    */
   
   public class ApplicationContext
  @@ -422,8 +422,7 @@
   
           // Return the current context if requested
           String contextPath = context.getPath();
  -        if ((contextPath.length() > 0) &&
  -            (uri.startsWith(contextPath))) {
  +        if ((contextPath.length() > 0) && (uri.equals(contextPath))) {
               return (this);
           }
   
  
  
  

--
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