src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java
branchhttp-client-branch
changeset 56036 89a688549f5d
parent 56020 ae3a51bc5b9f
child 56041 b4b5e09ef3cc
--- 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;
     }