Patch for org.apache.tomcat.request.StaticInterceptor.FileHandler 
Bug confirmed on Tomcat 3.2.1 and 3.2.2b1
Patch tested under Win2K

On filenames with spaces Context.getRealPath() doesn't convert %20 back to
spaces.
FileUtil.safePath() which is used by the method above comments state "On
Windows, makes "x.jsp.", "x.Jsp", and "x.jsp%20" return 404 instead of the
JSP source"

Diff against 3.2.1 release build.
$ diff StaticInterceptor.java StaticInterceptorPATCH.java
191c191,195
<      absPath = ctx.getRealPath( pathInfo );
---
>             /* PATCH ([EMAIL PROTECTED]) - Context.getRealPath() is not
decoding the path. Why?
>              * Filenames with spaces caused '404 - File Not Found' because
%20 is not being decoded.
>              */
>      absPath = java.net.URLDecoder.decode( ctx.getRealPath(pathInfo) );
>      //absPath = ctx.getRealPath( pathInfo );

Note that I'm not subscribed to the list. 

Cheers,
Orlando
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to