On 30/01/2025 11:20, Rémy Maucherat wrote:
On Thu, Jan 30, 2025 at 12:10 PM Mark Thomas <ma...@apache.org> wrote:

On 30/01/2025 10:32, Rémy Maucherat wrote:
Yes, there's an off by one issue, still don't understand what's
causing it (anything that gets into the available = 0 situations in
available() will break). My local code replaces the CRLF trick with
proper byte skipping and does not have the issue. I'll commit it to
see if the testsuite on CI is ok with it.

I've made some progress.

The readChunk is being changed outside of the ChunkedInputFilter during
the pause between writes from the client. I'm still tracking down the
root cause.

Ok. I committed my code a little bit earlier for testing.

The root cause was the the ChunkedInputFilter returning 0 bytes available when there were unconsumed bytes in readChunk. That caused Http11InputBuffer to read more data which over-wrote the unread bytes in ChunkedInputFilfer.readChunk

The ChunkedInputFilfer and Http11InputBuffer were then out of sync leading to the input corruption.

Your fix, which ensures all the bytes in ChunkedInputFilfer.readChunk are consumed, should fix this and any related issues.

Mark


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

Reply via email to