springboot、spirngcloud、springcloudalibaba version-dependent:

<spring-boot-version>2.6.11</spring-boot-version>
<spirng-cloud-version>2021.0.4</spirng-cloud-version>
<spring-cloud-alibaba-version>2021.0.4.0</spring-cloud-alibaba-version>
<feign-httpclient-version>11.8</feign-httpclient-version>

When openfeign uses HttpClient to initiate remote calls, response compression is invalid. The response compression takes effect after the HttpClient dependency is removed May I ask if there is a solution,Thanks

Comment From: wangliuliu1115

feign-gzip-demo.zipThis is my test code. After lowering the version in the global pom.xml to the version I annotated, and after annotating the bootstrap dependency out of the submodule, GZIP compression will take effect even when the httpclient dependency response is introduced

Comment From: wangliuliu1115

One problem with this version is that because ContentLength is always -1, the threshold for the server.min-Response-size configuration does not take effect until I add a ResonseConfig configuration class to the demo. GZIP compression is enabled regardless of the number of responders

Comment From: OlgaMaciaszek

Hello @wangliuliu1115, these versions of Spring Cloud and Spring Boot are out of open-source support. Please upgrade to Spring Cloud 2022.0.4 or 2023.0.0 (and Java 17) and the corresponding Boot version, and if the issue persists, please provide an upgraded sample.

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.