Jetty9 - Using the correct length when copying bytes, otherwise BufferUnderflowExceptions are thrown.

This commit is contained in:
Simone Bordet 2012-08-25 10:43:39 +02:00
parent cda0528625
commit c743bf4081
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}