From: Helmer <hkr...@fr...> - 2004-01-31 09:31:32
|
Hi, the following sequence of calls seems to be triggering a bug in jetty's LineInput when its buffer has some bytes left in it and a byte limit has been set: request.getInputStream().mark (4); request.getInputStream().read (new byte[4]); request.getInputStream().reset (); The first call will correctly set _mark = _pos. Since there are some bytes left in the buffer, the second call will only set _pos = _pos + 4 and _byteLimit will not be modified (since fill() is not called). The third call however will set _byteLimit = _byteLimit + _pos - _mark = _byteLimit + 4, thus incorrectly increasing the byte limit by the size of the buffer passed in the second call. Regards, Helmer Kraemer |