tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@central.sun.com>
Subject Found the problem with the different behavior between NT and Unix
Date Fri, 22 Sep 2000 19:45:00 GMT
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)


Mime
View raw message