tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r491619 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/ApplicationDispatcher.java webapps/docs/changelog.xml
Date Wed, 03 Jan 2007 12:23:27 GMT
Remy Maucherat wrote:
> markt@apache.org wrote:
>> Author: markt
>> Date: Mon Jan  1 11:31:29 2007
>> New Revision: 491619
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=491619
>> Log:
>> Port RD thread safety patch from TC5
> 
> I don't see any justification for this at the moment. Any further info ?

This started with http://marc.theaimsgroup.com/?t=116558790000003&r=1&w=2

The short version of the above thread is that a RD was obtained using
ServletContext.getNamedDispatcher() and then re-used. When multiple
requests used the RD at the same time, the request objects got mixed
up (since the RD is not thread safe) which in turn lead to an
occasional ISE when both threads tried to call getParameterMap() at
the same time on the same Request object.

There was some debate whether or not the spec intended RDs to be
re-used in this way. I couldn't see anything that explicitly
dis-allowed it; hence I implemented the patch.

There are a couple of places where the patch could be cleaner but I
opted to make the changes in a consistent way throughout the code so
it was clearer what the patch was doing. Cleaning this up is on my
list of things to do but I wanted to give people a chance to consider
the patch as-is first.

Mark

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


Mime
View raw message