JDK 21 on x86_64 causes truncated responses with Feign + HttpClient (content compression related)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start by reproducing the Feign call on JDK 21 with x86_64 Linux and a gzip-compressed response, then compare it with Windows and with HttpClient content compression disabled. Fill in the Feign and HTTP client versions while isolating the decompression path; done means the response body is complete without requiring the workaround.
Written by the indexing model from the issue text.
Description
Summary
After upgrading from JDK 17 to JDK 21, Feign client calls receive truncated response data when running on x86_64 Linux servers. The same code works correctly on Windows.
Expected Behavior
Feign should receive the complete response body regardless of the operating system or architecture.
Actual Behavior
- On Windows (dev machine): responses are complete, no truncation.
- On x86_64 Linux server (JDK 21): response data is truncated — the tail of the response body is missing.
Workaround
Calling httpClientBuilder.disableContentCompression() when building the HttpClient fixes the truncation issue on x86_64 servers. This suggests the problem is related to gzip / content-encoding decompression in combination with JDK 21 on x86_64.
Environment
- Feign version: (please fill in)
- bisheng JDK version: 21.0.11 (upgraded from 17)
- OS: Linux x86_64 (server) — affected
- OS: Windows (dev machine) — not affected
- HTTP client: (please fill in, e.g. Apache HttpClient / hc5)
Steps to Reproduce
- Set up a Feign client with JDK 21 on an x86_64 Linux server.
- Call an endpoint that returns a gzip-compressed response.
- Observe that the received response body is truncated.
- Add
.disableContentCompression()to the HttpClient builder. - Response is now complete.
Additional Context
The disableContentCompression workaround strongly indicates a JDK 21 regression in gzip/deflate decompression handling on x86_64 architecture, possibly interacting with the Feign HttpClient
- Dominant language
- Java
- Stars
- 9.8k
- Forks
- 2k
- Avg merge
- 12h 8m
- Merged PRs (30d)
- 40
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenFeign/feign
-
question
Difficulty 4/5 3-5 days Newbie friendliness 35/100
OpenFeign/feign#3332 · 1 comment ·
Maintainers usually reply within 1 day
-
question
Difficulty 3/5 1-2 days Newbie friendliness 52/100
OpenFeign/feign#3095 · 1 comment ·
Maintainers usually reply within 1 day
-
bug question
Difficulty 5/5 Over a week Newbie friendliness 25/100
OpenFeign/feign#3074 · 2 comments ·
Maintainers usually reply within 1 day
-
Http2Client with native HttpClient does not enforce response timeout correctlyPossibly taken @goutamadwant claimed this 100 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
OpenFeign/feign#3068 · 2 comments ·
Maintainers usually reply within 1 day
-
Why EncodeException's message is not nullable in 1st constructor but nullable in 2nd constructor?Openquestion
Difficulty 3/5 1-2 days Newbie friendliness 48/100
OpenFeign/feign#2973 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
Maintainers usually reply within 1 day
-
[BUG] S3 CORS responses omit Access-Control-Allow-Credentials for matched originsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
floci-io/floci#5369 · 1 comment ·
Maintainers usually reply within 1 day
-
securityHeaders replaces a route's own Content-Security-Policy (0.9.9; weakens embedders' pages)Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sqlcipher/sqlcipher-android#97 · 1 comment ·
-
area-integrations
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day