tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
Date Tue, 05 Feb 2013 22:34:41 GMT

Konstantin Kolinko <> changed:

           What    |Removed                     |Added
             Status|NEEDINFO                    |NEW

--- Comment #4 from Konstantin Kolinko <> ---
The following lines in (162-164 in trunk)

        if (pos >= lastValid) {

is the only place in this file where the return value of "readBytes()" is not

Looking at the code, if the method returns -1 then (lastValid - pos) will be -1
and it will proceed with "chunk.setBytes(buf, pos, result);", which seems a
wrong thing to do in such a case.

I have not tested what is the actual behaviour here, but an explicit "return
-1" or "throw new EOFException()" would be better.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message