-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
Springboot 3.2.0 RestTemplate not setting Content-Length with customized RestTemplate #38841
Comments
Thanks for getting in touch. It is difficult for us to know what is going on with the limited information you've provided. If you would like us to spend some time investigating, please provide a complete minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it and attaching it to this issue. |
This is called out in the Spring Framework upgrade guide at the end of the web section here. This was done for memory optimization but you can reinstate this behavior. Edit: also see spring-projects/spring-framework#31854 (comment) |
Thank you @bclozel |
Hello, upgrading spring-boot-starter-parent from 3.2.4 to 3.2.5 we got the same error again. As recommended whe still use BufferingClientHttpRequestFactory. Any ideas ? |
@dvag-erich-achilles is this for 0 length request bodies? If that's the case, see spring-projects/spring-framework#32678 |
@bclozel yes it is for 0 length request bodies, thank you for your hint. |
After upgrading to Springboot 3.2.0 from Springboot 3.1.5, custom RestTemplate is not setting the Content-Length header for requests.
The custom RestTemplate created was created with Apache HttpClient5: 5.2.3. The HttpClient is constructed to ignore hostname verification and SSL verification.
The text was updated successfully, but these errors were encountered: