tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter J. Farrell" <>
Subject request.getPathInfo() gets truncated when ";" is present
Date Thu, 23 Jul 2009 19:41:10 GMT
I'm trying to figure out a particular strange problem with 
request.getPathInfo() data being truncated.  This has to do with SES / 
Friendly URLs in which data is append on the path info part of the 
request URI.  On the framework project I work on, we've seen developers 
put data into SES URL -- in order to keep the URI compliant for web 
servers we URL encode special characters (i.e. & -> &amp;).  As you may 
know, anything can be game in URLs theses days.

Anyways, the problem we're seeing with Tomcat is that it incorrectly 
parses the pathInfo when a ";" is present.  Since an example is worth a 
million words, here is example request URI (yes, CFML engine here 
deployed as a WAR):


One would expect the path info data to be:


However Tomcat truncates everything after start the ";".  The end result 
when calling request.getPathInfo() is:


I know that Apache is passing the correct information to Tomcat because 
request.getRequestURI() returns the full path including the complete 
path info. The problem is this breaks the path info because it is not 
the path info has been truncated.  There is nothing in the servlet specs 
that I can find that says that ";" cannot be in the path info and it 
seems valid according to the RFCs available that ";" in path info is a 
valid character.

I've done a bit of poking around in the Tomcat code base, but nothing 
jumps out at me at where this going wrong (although I could be looking 
in the wrong places).  Does anybody know where this is going wrong?  If 
so I'd like to know so I can file ticket regarding this problem.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message