Temp. disable use of new PagedBytesReference since it breaks HTTP replies with 0-sized Content-Length

This commit is contained in:
Holger Hoffstätte 2014-03-25 17:45:32 +01:00
parent 431b4024e9
commit 424bffca74
1 changed files with 3 additions and 1 deletions

View File

@ -153,7 +153,9 @@ public class BytesStreamOutput extends StreamOutput implements BytesStream {
@Override
public BytesReference bytes() {
return new PagedBytesReference(bigarrays, bytes, count);
BytesRef bref = new BytesRef();
bytes.get(0, count, bref);
return new BytesArray(bref, false);
}
private void ensureCapacity(int offset) {