You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2023/02/24 16:26:48 UTC

[Bug 66488] MessageBytes#toBytesSimple overwrites request byte buffer

https://bz.apache.org/bugzilla/show_bug.cgi?id=66488

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Thanks for the report. I'll take a look.

The intention is that the original byte[] is shared to reduced memory footprint
and unnecessary copying. Given that the original data is in bytes, I want to
look into why toBytes() is triggering a conversion. It suggests some byte to
TBD conversion has happened beforehand.

I agree that your proposed fix is easy. That said, I want to see if I can find
a robust solution that avoids the creation of the new array. I'll note that the
non-simple conversion already uses the approach you suggest.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org