tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hari...@hyperreal.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core DefaultServlet.java
Date Sat, 30 Oct 1999 03:21:38 GMT
harishp     99/10/29 20:21:38

  Modified:    src/share/org/apache/tomcat/core Tag: TOMCAT_J2EE_10F_102199
                        DefaultServlet.java
  Log:
  A bit more efficient.... Changed a string comparison  to a char comparison.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.2   +6 -5      jakarta-tomcat/src/share/org/apache/tomcat/core/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/DefaultServlet.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- DefaultServlet.java	1999/10/30 03:18:17	1.3.2.1
  +++ DefaultServlet.java	1999/10/30 03:21:36	1.3.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/DefaultServlet.java,v
1.3.2.1 1999/10/30 03:18:17 harishp Exp $
  - * $Revision: 1.3.2.1 $
  - * $Date: 1999/10/30 03:18:17 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/DefaultServlet.java,v
1.3.2.2 1999/10/30 03:21:36 harishp Exp $
  + * $Revision: 1.3.2.2 $
  + * $Date: 1999/10/30 03:21:36 $
    *
    * ====================================================================
    *
  @@ -352,8 +352,9 @@
           // return 404 instead of the JSP source
   	// On all platforms, makes sure we don't let ../'s through
           // Unfortunately, on Unix, it prevents symlinks from working
  -	// So, a check for File.separator("\\").....
  -	if (File.separator.equals("\\") && (!absPath.equals(canPath)) ) {
  +	// So, a check for File.separatorChar='\\' ..... It hopefully
  +	// happens on flavors of Windows.
  +	if ( (File.separator == '\\') && (!absPath.equals(canPath)) ) {
   	    response.sendError(response.SC_NOT_FOUND);
   
   	    return;
  
  
  

Mime
View raw message