Bug 30535 - Servlet mapping fails when url includes semicolon
Summary: Servlet mapping fails when url includes semicolon
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.0.19
Hardware: PC other
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-09 08:49 UTC by Jørn Svendsen
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jørn Svendsen 2004-08-09 08:49:07 UTC
When servlet mapping includes *.txt and the input url looks like:
http://server:port/app/aaa/bbb/cc%3Bcc/dd%3Bdd/some.txt the Tomcat returns
a status of 404 (Not Found).

It looks that the path is terminated when semicolon (%3B) is meet, and no 
matching occur.

This problem is new to Tomcat 5 as it has been no problems in Tomcat 4 
environments using similar url formats.
Comment 1 Yoav Shapira 2004-08-11 16:36:56 UTC
I think the Servlet Specification v2.4 doesn't mandate us to map URLs with 
colons, as that's a URL terminator.  Can you show otherwise?
Comment 2 Jørn Svendsen 2004-08-12 08:23:00 UTC
Here the semicolon is used in the path part of the URL in it escaped form (%3B).
As this is a valid url I think the match to "*.txt" should apply (as it does in 
previous versions of Tomcat).
I have not checked the Servlet spec. 2.4 - Yet.

/Jørn
Comment 3 Tim Funk 2004-09-02 00:35:22 UTC
See Section 13.2. It says:
"URI paths specified in the deployment descriptor are assumed to be in URLdecoded
form."

That would lead me to believe the URL needs to be decoded before the request can
be mapped.

Since the %3B decodes to ;. Everything after that is taken as a path variable
and therefore ignored in the servlet mapping.