Details
-
Bug
-
Status: Resolved
-
P3
-
Resolution: Fixed
-
11, 17, 19
-
b03
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8299270 | 20 | Chris Hegarty | P3 | Resolved | Fixed | b30 |
JDK-8299353 | 17.0.7 | Chris Hegarty | P3 | Resolved | Fixed | b01 |
Description
The implementation of PathSubscriber should ensure that all bytes from the given buffers are written. Specifically, this method in PathSubscriber:
@Override
public void onNext(List<ByteBuffer> items) {
try {
out.write(items.toArray(Utils.EMPTY_BB_ARRAY));
...
the implementation assumes out.write(ByteBuffer[]) always writes the content of all buffers - this isn't the case and the method can write a lesser number of bytes from input buffers.
See https://mail.openjdk.org/pipermail/net-dev/2022-December/019883.html
@Override
public void onNext(List<ByteBuffer> items) {
try {
out.write(items.toArray(Utils.EMPTY_BB_ARRAY));
...
the implementation assumes out.write(ByteBuffer[]) always writes the content of all buffers - this isn't the case and the method can write a lesser number of bytes from input buffers.
See https://mail.openjdk.org/pipermail/net-dev/2022-December/019883.html
Attachments
Issue Links
- backported by
-
JDK-8299270 Ensure that HttpResponse.BodySubscribers.ofFile writes all bytes
-
- Resolved
-
-
JDK-8299353 Ensure that HttpResponse.BodySubscribers.ofFile writes all bytes
-
- Resolved
-
- links to
-
Commit openjdk/jdk17u-dev/3ff9669b
-
Commit openjdk/jdk20/9863f59e
-
Commit openjdk/jdk/a7d6de71
-
Review openjdk/jdk17u-dev/964
-
Review openjdk/jdk20/70
-
Review openjdk/jdk/11722
(3 links to)