Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

JDK 21 on x86_64 causes truncated responses with Feign + HttpClient (content compression related)

Open
#3,578 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
backend

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
  1. Set up a Feign client with JDK 21 on an x86_64 Linux server.
  2. Call an endpoint that returns a gzip-compressed response.
  3. Observe that the received response body is truncated.
  4. Add .disableContentCompression() to the HttpClient builder.
  5. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenFeign/feign

All issues in OpenFeign/feign

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.