This is an automated email from the ASF dual-hosted git repository.
robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
The following commit(s) were added to refs/heads/master by this push:
new 29d29c9887 AXIS2-6101 Implement getResponseContentEncoding() in H2
transports
29d29c9887 is described below
commit 29d29c98871df1013ad711a9eef168470843176c
Author: Robert Lazarski <[email protected]>
AuthorDate: Sun Apr 12 14:56:18 2026 -1000
AXIS2-6101 Implement getResponseContentEncoding() in H2 transports
H2RequestImpl and H2StreamingRequestImpl implement the new
Request.getResponseContentEncoding() method added for the HC5 5.6+
double-decompression fix. Both return null since the HTTP/2 async
pipeline handles decompression before the response body is exposed.
Fixes Java 17 CI build failure — these classes implement the
Request interface and must provide the new abstract method.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
.../apache/axis2/transport/h2/impl/httpclient5/H2RequestImpl.java | 8 ++++++++
.../transport/h2/impl/httpclient5/H2StreamingRequestImpl.java | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git
a/modules/transport-h2/src/main/java/org/apache/axis2/transport/h2/impl/httpclient5/H2RequestImpl.java
b/modules/transport-h2/src/main/java/org/apache/axis2/transport/h2/impl/httpclient5/H2RequestImpl.java
index 0b2664ebe6..e75a34f591 100644
---
a/modules/transport-h2/src/main/java/org/apache/axis2/transport/h2/impl/httpclient5/H2RequestImpl.java
+++
b/modules/transport-h2/src/main/java/org/apache/axis2/transport/h2/impl/httpclient5/H2RequestImpl.java
@@ -224,6 +224,14 @@ public class H2RequestImpl implements Request {
return null;
}
+ @Override
+ public String getResponseContentEncoding() {
+ // HTTP/2 async responses use SimpleHttpResponse which does not expose
+ // entity content encoding separately. Return null (no encoding) since
+ // HC5's async pipeline handles decompression before we see the body.
+ return null;
+ }
+
@Override
public int getStatusCode() {
return response != null ? response.getCode() : -1;
diff --git
a/modules/transport-h2/src/main/java/org/apache/axis2/transport/h2/impl/httpclient5/H2StreamingRequestImpl.java
b/modules/transport-h2/src/main/java/org/apache/axis2/transport/h2/impl/httpclient5/H2StreamingRequestImpl.java
index 2e603f43dd..f2bb0d6c18 100644
---
a/modules/transport-h2/src/main/java/org/apache/axis2/transport/h2/impl/httpclient5/H2StreamingRequestImpl.java
+++
b/modules/transport-h2/src/main/java/org/apache/axis2/transport/h2/impl/httpclient5/H2StreamingRequestImpl.java
@@ -278,6 +278,14 @@ public class H2StreamingRequestImpl implements Request {
return null;
}
+ @Override
+ public String getResponseContentEncoding() {
+ // HTTP/2 streaming responses use SimpleHttpResponse which does not
+ // expose entity content encoding separately. Return null since
+ // HC5's async pipeline handles decompression before we see the body.
+ return null;
+ }
+
@Override
public void releaseConnection() {
log.trace("Releasing HTTP/2 streaming connection resources");