Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing web client request header #44737

Closed
sladjo opened this issue Mar 17, 2025 · 1 comment
Closed

Missing web client request header #44737

sladjo opened this issue Mar 17, 2025 · 1 comment
Labels
for: external-project For an external project and not something we can fix status: duplicate A duplicate of another issue

Comments

@sladjo
Copy link

sladjo commented Mar 17, 2025

After upgrading Spring Boot from version 3.3.5 to 3.4.3, we started receiving an HTTP 411 error from an external service when performing a POST request via WebClient and HTTP/1.1.

To identify the exact version introducing the issue, we compared the behavior across different Spring Boot versions and observed:
• In 3.3.5: A Transfer-Encoding: chunked header is sent.
• In 3.4.0: Also Transfer-Encoding: chunked.
• Starting with 3.4.1: Instead of Transfer-Encoding, a Content-Length: 0 header is sent (this is also true for 3.4.2).
• In 3.4.3: Neither Transfer-Encoding nor Content-Length is present.

It appears that the external service rejects the request if neither header is included.

To illustrate this, I created a sample application that closely mirrors our configuration and call, and which logs the sent headers. When running on Spring Boot 3.4.3, the logs show that neither header is sent; however, reverting to an earlier version brings back one of these headers, and the request works in our application as expected.

demo.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 17, 2025
@bclozel
Copy link
Member

bclozel commented Mar 17, 2025

I think this can be tracked to reactor-netty itself. There have been changes in this area.

@bclozel bclozel closed this as completed Mar 17, 2025
@bclozel bclozel added status: duplicate A duplicate of another issue for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants