Skip to content

Commit

Permalink
Merge pull request #1683 from fl4via/UNDERTOW-2448
Browse files Browse the repository at this point in the history
[UNDERTOW-2448] At ServletPrintWriter.write(CharBuffer) do not mark e…
  • Loading branch information
fl4via authored Oct 16, 2024
2 parents 810a653 + 92a92cc commit 86170f7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ public void write(final CharBuffer input) {
remainingContentLength -= writtenLength;
outputStream.updateWritten(writtenLength);
if (result.isOverflow() || !buffer.hasRemaining()) {
final int remainingBytesBeforeFlush = buffer.remaining();
outputStream.flushInternal();
if (buffer.remaining() == remaining) {
if (buffer.remaining() == remainingBytesBeforeFlush) {
// no progress has been made, set error to true
error = true;
return;
}
Expand Down

0 comments on commit 86170f7

Please sign in to comment.