Skip to content

Commit

Permalink
Backport #115197 (#115207)
Browse files Browse the repository at this point in the history
Backport #115197

Closes #115318
  • Loading branch information
pxsalehi authored Oct 22, 2024
1 parent ade82f2 commit 57030d2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,8 @@ protected void sendIncompleteContent(HttpExchange exchange, byte[] bytes) throws
if (bytesToSend > 0) {
exchange.getResponseBody().write(bytes, rangeStart, bytesToSend);
}
if (randomBoolean()) {
exchange.getResponseBody().flush();
}
// Since JDK23 we need to always flush. See https://bugs.openjdk.org/browse/JDK-8331847.
exchange.getResponseBody().flush();
}

/**
Expand Down

0 comments on commit 57030d2

Please sign in to comment.