Skip to content

Fix issue #1204#1366

Merged
ryanjbaxter merged 2 commits intospring-cloud:4.3.xfrom
ban-xiu:fix-issue-1204-4.3.x
Apr 3, 2026
Merged

Fix issue #1204#1366
ryanjbaxter merged 2 commits intospring-cloud:4.3.xfrom
ban-xiu:fix-issue-1204-4.3.x

Conversation

@ban-xiu
Copy link
Copy Markdown
Contributor

@ban-xiu ban-xiu commented Apr 3, 2026

Close #1204.

Remove @ConditionalOnBean(Client.class) from FeignAcceptGzipEncodingAutoConfiguration FeignAcceptGzipEncodingAutoConfiguration requires a feign.Client bean in the main context to activate. When no explicit Client bean is registered (e.g., no load balancer on classpath), response compression is silently skipped even with compression.response.enabled=true.

FeignAcceptGzipEncodingInterceptor is a RequestInterceptor that only adds an Accept-Encoding header — it has no dependency on Client. Removing this condition makes it consistent with FeignContentGzipEncodingAutoConfiguration, which never had this restriction.

All Feign client implementations (JDK HttpURLConnection, Apache HC5, Java HttpClient) handle gzip decompression transparently, so there is no risk.

@ryanjbaxter
Copy link
Copy Markdown
Contributor

The test appears to be failing

ban-xiu added 2 commits April 4, 2026 00:36
Signed-off-by: lanbinshen <lanbinshen@xiaomi.com>
Signed-off-by: lanbinshen <lanbinshen@xiaomi.com>
@ban-xiu ban-xiu force-pushed the fix-issue-1204-4.3.x branch from d0781e9 to f14a7d0 Compare April 3, 2026 16:36
@ryanjbaxter ryanjbaxter changed the title Fix issue#1204 Fix issue #1204 Apr 3, 2026
@ryanjbaxter ryanjbaxter merged commit 1fe44f5 into spring-cloud:4.3.x Apr 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Response Compression Not Working Due to Missing Accept-Encoding Header

3 participants