elasticsearch/elasticsearch — pull request #5677 by s1monw (2014-04-03 15:47:00+00:00)
Title: Take stream position into account when calculating remaining length

Currently `PagedBytesReferenceStreamInput#read(byte[],int,int)` ignores
the current pos and that causes to read past EOF

Closes #5667