tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Korthof ...@apache.org>
Subject Re: FW: Simple tomcat bug with fix
Date Thu, 15 Jun 2000 21:07:28 GMT
this looks simple and correct, so i commited the change.  i also commited
a few minor changes to the user's guide; if anyone minds, please do tell
me.

thanks --

ed

On Thu, 15 Jun 2000, Jon Stevens wrote:

> someone want to take care of this one?
> 
> thanks,
> 
> -jon
> 
> ----------
> 
> I have found a very simple bug in Tomcat, which still exists in the latest
> nightly snapshot.
> 
> In the file TOMCAT_HOME/src/share/org/apache/tomcat/util/RequestUtil.java,
> on line 89, there is a statement to change the browser submitted
> content-type header to discard the part that comes after the semi-colon.
> That is, to change
> Content-Type: application/x-www-form-urlencoded;charset=UTF-8
> into
> Content-Type: application/x-www-form-urlencoded
> 
> The statement reads:
> contentType=contentType.substring(0,contentType.indexOf(";")-1);
> 
> However, this truncates the last character of the actual content-type,
> yielding
> Content-Type: application/x-www-form-urlencode
> 
> Just drop the -1 to fix.
> 
> Sincerely,
> Chris Sokol
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 



Mime
View raw message