Skip to content

Commit

Permalink
CXF-8629: AsyncHTTPConduit (hc5) should support chunked request / res…
Browse files Browse the repository at this point in the history
…ponse. Fix java.lang.IllegalStateException caused by Encoding process already completed
  • Loading branch information
reta committed Oct 9, 2024
1 parent 2615289 commit 8764966
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public int produceContent(final DataStreamChannel stream) throws IOException {
setOutputMode();
int bytesWritten = 0;
if (largeWrapper != null || super.hasData()) {
if (!buffer().hasRemaining() && largeWrapper != null) {
if (!buffer().hasRemaining() && largeWrapper != null && largeWrapper.hasRemaining()) {
bytesWritten = channel.write(largeWrapper);
} else {
} else if (buffer().hasRemaining()) {
bytesWritten = channel.write(buffer());
}
}
Expand Down

0 comments on commit 8764966

Please sign in to comment.