larryi      01/07/17 07:02:34

  Modified:    src/share/org/apache/tomcat/modules/mappers
                        SimpleMapper1.java
  Log:
  Some corrections for the case insensitive handling.
  
  Revision  Changes    Path
  1.7       +7 -4      
jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/SimpleMapper1.java
  
  Index: SimpleMapper1.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/SimpleMapper1.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SimpleMapper1.java        2001/07/16 00:19:46     1.6
  +++ SimpleMapper1.java        2001/07/17 14:02:33     1.7
  @@ -568,9 +568,12 @@
       /**
        */
       public void addExactMapping( String host, String path, Object target ) {
  -     if( host==null )
  -         exactMappedServlets.put( path, target);
  -     else {
  +        if( host==null ) {
  +            if ( ignoreCase )
  +                exactMappedServlets.put( path.toLowerCase(), target);
  +            else
  +                exactMappedServlets.put( path, target);
  +        } else {
            host=host.toLowerCase();
            PrefixMapper vmap=(PrefixMapper)vhostMaps.get( host );
            if( vmap == null ) {
  @@ -596,7 +599,6 @@
        String host=hostMB.toString();
        String path=pathMB.toString();
        Object container = null;
  -        String s = path;
   
        PrefixMapper myMap=null;
        if( host!=null ) {
  @@ -621,6 +623,7 @@
            if( container!=null ) return container;
        }
                
  +        String s = path;
        while (s.length() >= 0) {
            //if(debug>8) context.log( "Prefix: " + s  );
            container = myMap.prefixMappedServlets.get(s);
  
  
  

Reply via email to