--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java Mon Jan 22 17:29:07 2018 +0000
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java Tue Jan 23 13:21:59 2018 +0000
@@ -765,7 +765,7 @@
// blocks waiting for stream send window, if exhausted
int actualAmount = windowController.tryAcquire(requestAmount, streamid, this);
if (actualAmount <= 0) return null;
- ByteBuffer outBuf = Utils.slice(buffer, actualAmount);
+ ByteBuffer outBuf = Utils.sliceWithLimitedCapacity(buffer, actualAmount);
DataFrame df = new DataFrame(streamid, 0 , outBuf);
return df;
}