This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/main by this push:
new 8764966250 CXF-8629: AsyncHTTPConduit (hc5) should support chunked
request / response. Fix java.lang.IllegalStateException caused by Encoding
process already completed
8764966250 is described below
commit 8764966250c3ef1910c00fe3adbca483684f0455
Author: Andriy Redko <[email protected]>
AuthorDate: Wed Oct 9 14:11:40 2024 -0400
CXF-8629: AsyncHTTPConduit (hc5) should support chunked request / response.
Fix java.lang.IllegalStateException caused by Encoding process already completed
---
.../apache/cxf/transport/http/asyncclient/hc5/SharedOutputBuffer.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/rt/transports/http-hc5/src/main/java/org/apache/cxf/transport/http/asyncclient/hc5/SharedOutputBuffer.java
b/rt/transports/http-hc5/src/main/java/org/apache/cxf/transport/http/asyncclient/hc5/SharedOutputBuffer.java
index b0b9ed2338..a006ebacb6 100644
---
a/rt/transports/http-hc5/src/main/java/org/apache/cxf/transport/http/asyncclient/hc5/SharedOutputBuffer.java
+++
b/rt/transports/http-hc5/src/main/java/org/apache/cxf/transport/http/asyncclient/hc5/SharedOutputBuffer.java
@@ -113,9 +113,9 @@ public class SharedOutputBuffer extends ExpandableBuffer {
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());
}
}