Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4802

Springboot 3.2.0 custom RestTemplate doesn't send Content-Length

$
0
0

I have a springboot 3.1.5 application that's I've tried to upgrade to Springboot 3.2.0. This application makes REST calls to another server using a custom RestTemplate. The custom RestTemplate (based on Apache HttpClient 5.2.3) is constructed to ignore SSL certificate verification.

The server that is being invoked returns: 411 Length Required. When adding debug to the springboot 3.2.0 application it seems the "Content-length" header is not being set with springboot 3.2.0. When running Spring 3.1.5, even with the same version of HttpClient, the "Content-Length" is set.

If I send an empty string ("") when there is no body to the post request, this works. Also when I manually serialize objects to String, it works.


Viewing all articles
Browse latest Browse all 4802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>