tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Webapp reloading issue and intermittent 404 errors
Date Tue, 29 Jun 2010 11:54:15 GMT
On 29/06/2010 12:51, Tomislav Petrović wrote:

> This is problematic code (part of normalize method):
>
> 	// Resolve occurrences of "//" in the normalized path
> 	while (true) {
> 		int index = normalized.indexOf("//");
> 		if (index<  0)
> 			break;
> 		normalized = normalized.substring(0, index) +
> 			normalized.substring(index + 1);
> 	}
>
> Seems to me code assumes that if it founds "//" in a string then this "//" is not at
the
> end of the string (has to have something behind it). In general case this sounds like
a
> bug to me (however I am not expert here and don't know from where filename comes and
how
> it should be written).
> So if anyone can tell me form where a name (filename) given to normalize comes (I assume
> it is something in classpath, configuration, path, or....?). So I can find it and remove
> (probably extra // or \) to solve my problem.

Nope. That code will run quite happily if "//" is at the end of the 
string. That is what is so odd about this error.

Also note it is perfectly valid for the path to end with "/".

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message