-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Springboot 3.2.0 RestTemplate not setting Content-Length with customized RestTemplate #38841
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
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. |
We got same error insufficient data written : I/O error on POST request for "http:// when we migrated springboot 2.x to 3.3 version, ut I did nt get solution ... please can any one help to give solution... |
I used the this picemof code |
Can you share a minimal sample application that we can git clone or unzip then run? Once you can share this sample application please open a new issue here: https://github.com/spring-projects/spring-framework/issues If you cannot reproduce the problem with a minimal application then please ask a question on StackOverflow. |
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: