spring-cloud-openfeign icon indicating copy to clipboard operation
spring-cloud-openfeign copied to clipboard

Response Compression Not Working Due to Missing Accept-Encoding Header

Open dekholud opened this issue 5 months ago • 0 comments
trafficstars

Describe the bug I'm using the compression feature of the spring-cloud-openfeign library. However, I can see that the response compression is not working because the Accept-Encoding header is not being sent on the client side. Additionally, the FeignAcceptGzipEncodingInterceptor is missing from the requestInterceptors field in the SynchronousMethodHandler class.

Interestingly, when I create the following bean:

@Bean
Client defaultClient() {
    return new Client.Default(null, null);
}

The Accept-Encoding header starts being sent, and the FeignAcceptGzipEncodingInterceptor appears in the list of requestInterceptors.

Sample To reproduce the bug, I have added a repository: https://github.com/dekholud/spring-cloud-openfeign-issue

dekholud avatar May 30 '25 09:05 dekholud