tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44310] - Possible data packet corruption when sending data on the outputStream of a recycled response
Date Mon, 28 Jan 2008 23:36:09 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44310>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44310





------- Additional Comments From cpierret@sparus-software.com  2008-01-28 15:36 -------
This issue does not depend on the usage of the Comet API.
It is related to the usage of the Coyote Response object with sends occurring in
separate thread as read.

In Response.recycle(), the outputBuffer is always recycled and neither the
Response that references the outputStream that references the outputBuffer are.

It can lead to the outputStream referencing the outputBuffer reallocated to
another outputStream in another Response object, which can occur as soon as you
try to send data asynchronously in another thread (due to read errors not
depending on the usage of Comet). 

At least the outputBuffer should not be recycled by default in this case for
consistency, since there are two public API objects referencing it without being
recycled.  IMHO, the behaviour of the Response.recyle can be viewed as
inconsistent and can lead to inter web app side effects.
The attached patch fixes this issue with a regression risk that is extremely low .



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message