-
Notifications
You must be signed in to change notification settings - Fork 41.1k
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
HttpClient5 5.4.3 breaks local Docker transport #45028
Comments
The change, https://issues.apache.org/jira/browse/HTTPCLIENT-2363, is applied to 5.4.3 onwards, which means Boot 3.4 and 3.5 is affected. |
It's now working when we do the httpclient |
Thanks @waileong for letting us know and for the detailed analysis! |
You're welcome! Glad it helped. Let me know if you need anything else. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HttpClient5 v5.4.3 breaks Spring Boot bootBuildImage with "malformed Host header"
Description
Spring Boot's
bootBuildImage
task fails with HTTP 400 when using HttpComponents Client 5.4.3 due to malformed Host headers being sent to Docker.Reproduction
You can reproduce this issue with this sample project: https://github.com/waileong/springboot-bootbuildimage-hc5
Or manually:
build.gradle
:./gradlew bootBuildImage
Error
Debug logs show:
Cause
Commit 57d5a1376 - "DefaultHost: derive default host name from target address" - changed how Host headers are derived.
The Host header now includes the full URI scheme for named pipes:
This violates HTTP/1.1 spec and breaks Docker API communication.
Workaround
Pin to HttpClient 5.4.2:
force 'org.apache.httpcomponents.client5:httpclient5:5.4.2'
Environment
Request
Please fix Host header generation for non-HTTP URI schemes (named pipes/unix sockets). Consider using "localhost" or allowing custom Host values for these cases.
The text was updated successfully, but these errors were encountered: