mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-04 12:59:30 +00:00
Jetty9 - Using the correct length when copying bytes, otherwise BufferUnderflowExceptions are thrown.
This commit is contained in:
parent
cda0528625
commit
c743bf4081
@ -35,7 +35,7 @@ public class ByteBufferHttpInput extends HttpInput<ByteBuffer>
|
||||
protected int get(ByteBuffer item, byte[] buffer, int offset, int length)
|
||||
{
|
||||
int l = Math.min(item.remaining(), length);
|
||||
item.get(buffer, offset, length);
|
||||
item.get(buffer, offset, l);
|
||||
return l;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user