tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1031024 - /tomcat/tc6.0.x/trunk/STATUS.txt
Date Thu, 04 Nov 2010 16:07:41 GMT
2010/11/4  <markt@apache.org>:
> Author: markt
> Date: Thu Nov  4 15:14:00 2010
> New Revision: 1031024
>
> URL: http://svn.apache.org/viewvc?rev=1031024&view=rev
> Log:
> Reply to veto
>
> Modified:
>    tomcat/tc6.0.x/trunk/STATUS.txt
>
>* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49860
>  Add support for trailing headers.
>  http://svn.apache.org/viewvc?rev=1003461&view=rev
>  Note: Don't change return type for parseEndChunk(), just return true.
>  +1: markt, rjung
>  -1: kkolinko:
>    Regarding implementation of ChunkedInputFilter.parseHeader():
>     One cannot remember old value of 'pos' (e.g. 'int start = pos')
>     outside of a loop that calls readBytes(). The remembered positions
>     are not valid after the readBytes() call.
> +    markt: This is pretty much an exact copy of
> +           InternalInputBuffer.parseHeader() which has been working for years.
> +           Could you elaborate on where you see the issue. A test case that
> +           demonstrates it would be even better.
>

InternalInputBuffer.fill() behaves differently when it parses headers
vs. when it parses the body.

            pos = end;
            lastValid = pos;
            nRead = inputStream.read(buf, pos, buf.length - lastValid);

because of pos = end assignment it writes over the old bytes,
while when parsing the header it always adds to the end of the buffer.

BTW, in the InternalInputBuffer.fill() method the both calls
inputStream.read(buf, pos, buf.length - lastValid);
should have been
inputStream.read(buf, pos, buf.length - pos);
though it is hard to tell the difference.


I think it will be observed in the same circumstances as the recently fixed
https://issues.apache.org/bugzilla/show_bug.cgi?id=50072
i.e. a slow connection, with a trailer that exceeds the packet size.

Best regards,
Konstantin Kolinko

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


Mime
View raw message