Bug 37220 - Semi-colon in filename HTTP bug
Summary: Semi-colon in filename HTTP bug
Status: RESOLVED WONTFIX
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Connector:HTTP (show other bugs)
Version: 5.5.12
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-24 15:31 UTC by Roland Rabben
Modified: 2005-10-24 11:36 UTC (History)
0 users



Attachments
Screen dump of directorylisting with filename containing semi-colon. (28.80 KB, image/gif)
2005-10-24 15:32 UTC, Roland Rabben
Details
Screen-dump of error-msg when I click the filename with semi-colon. (29.31 KB, image/gif)
2005-10-24 15:32 UTC, Roland Rabben
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Rabben 2005-10-24 15:31:28 UTC
When trying to download a file via HTTP from Tomcat I an get error if the 
filename contains the semi-colon ; character.

I place a file with semi-colon in the filename under the Tomcat http server. 
When I am linking to that file (test;01.png) i get "the requested resource is 
not available.

Take a look at the attached screendumps.

Screen1 shows a directory listing of the file in question.
Screen2 shows the error-msg when i click the filename.

This is not a problem in Apache 2.0.53.
I tested and found this problem using IE 6.0 and Firefox 1.0.7 against Tomcat 
5.5.12 running on a Windows XP SP2 system.
Comment 1 Roland Rabben 2005-10-24 15:32:06 UTC
Created attachment 16785 [details]
Screen dump of directorylisting with filename containing semi-colon.
Comment 2 Roland Rabben 2005-10-24 15:32:52 UTC
Created attachment 16786 [details]
Screen-dump of error-msg when I click the filename with semi-colon.
Comment 3 Remy Maucherat 2005-10-24 16:01:00 UTC
Sorry, but anything after ';' is stripped off and treated as a path parameter,
even if ';' encoded. I don't want to take risks and handle this differently, so
this issue is not going to be fixed.
Comment 4 Roland Rabben 2005-10-24 19:27:57 UTC
(In reply to comment #3)
> Sorry, but anything after ';' is stripped off and treated as a path 
parameter,
> even if ';' encoded. I don't want to take risks and handle this differently, 
so
> this issue is not going to be fixed.

This just means that Tomcat can't/won't handle encoding properly. That is sad. 
For all I know this might be a problem for other characters as well. How come 
Tomcat handles this differently than Apache and IIS?

This most likely causes a bug in the WebDAV Servlet. If you try to upload a 
file to Tomcat using WebDAV, all characters after ';' is stripped form the 
file name.
Comment 5 Remy Maucherat 2005-10-24 19:36:04 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Sorry, but anything after ';' is stripped off and treated as a path 
> parameter,
> > even if ';' encoded. I don't want to take risks and handle this differently, 
> so
> > this issue is not going to be fixed.
> 
> This just means that Tomcat can't/won't handle encoding properly. That is sad. 
> For all I know this might be a problem for other characters as well. How come 
> Tomcat handles this differently than Apache and IIS?
> 
> This most likely causes a bug in the WebDAV Servlet. If you try to upload a 
> file to Tomcat using WebDAV, all characters after ';' is stripped form the 
> file name.

That's the way it is for the ';' character. If you don't like it, you can try to
patch your Tomcat or use a different product.