You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Larry Isaacs <La...@sas.com> on 2000/09/22 22:40:35 UTC

RE: Found the problem with the different behavior between NT and Unix

I don't think I have ever seen 8.3 names come back from
getCanonicalPath().

I did a quick test with JDK 1.3 and Tomcat 3.2 installed at
"D:\Jakarta Test\jakarta-tomcat".  getCanonicalPath() returned
the full non-8.3 names in FileUtil.safePath().

I have also run Watchdog against Tomcat (both tomcat_32 branch)
in the above directory with JDK's 1.3, 1.2.2, and 1.1.8.
Everything passes except for a few tests with JDK 1.1.8, where
the path to the JSP's servlet source goes over 256 characters.  

I don't know why 8.3 names are being returned is your case.
Which JDK are you using?

Larry


> -----Original Message-----
> From: Arieh Markel [mailto:Arieh.Markel@central.sun.com]
> Sent: Friday, September 22, 2000 3:45 PM
> To: tomcat-dev@jakarta.apache.org
> Subject: Found the problem with the different behavior between NT and
> Unix
> 
> 
> The problem is manifested in the inability of Tomcat to serve files.
> 
> The reason for that inability is caused by the following:
> 
> 	. the canonical path for a file may have a different
> 	  representation from that of the real path for the same file
> 
> 	  
> For example, assume the file to be served is:
> 
> Its realpath is returned as:
> 
>    C:\Program Files\Sun 
> Microsystems\StorEdge\etc\opt\SUNWesm\www\console
> 
> Its canonical path is returned as:
> 
>    C:\PROGRA~1\SUNMIC~1\StorEdge\etc\opt\SUNWesm\www\console
>  
>    
> Which results on the function that compares (DefaultServlet on 3.1 -
> util/FileUtil on 3.2) to not be able to return the file.
> 
> 
> The type of fix that I am proposing to have is that if the 
> real-canonical comparison fails, to give another try with the 
> conversion
> of the appopriate portions of the canonical to the 8.3 format.
> 
> (Does anybody have a Java method to generate the appropriate 'tilde'
> conversions of longer-than-9 directory/file names ?).
> 
> Has anybody ran into similar issues ?
> 
> Thanks,
> 
> Arieh
> --
>  Arieh Markel		                Sun Microsystems Inc.
>  Network Storage                        500 Eldorado Blvd. MS 
> UBRM11-194
>  e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
>  Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
>  (e-mail me with subject SEND PUBLIC KEY to get public key)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>