You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using newly (in 3.1.0) added support for SSLBundles, all HTTP requests made via RestTemplate (org.springframework.web.client.RestTemplate) are sent as GET requests, even if the request was made as other Http method.
From what i could see from debugging, this method call checks for ssl bundle, but does not call setRequestMethod() on the connection object: ClientHttpRequestFactories.prepareConnection()
wilkinsona
changed the title
REST requests are sent with wrong HttpMethod when SSLBundles are used
When using SimpleClientHttpRequestFactory, non-GET requests sent with RestTemplate have the wrong HttpMethod when SSLBundles are used
Jun 21, 2023
Spring Boot Version: 3.1.0
Java version: 17
When using newly (in 3.1.0) added support for SSLBundles, all HTTP requests made via RestTemplate (org.springframework.web.client.RestTemplate) are sent as GET requests, even if the request was made as other Http method.
For example, RestTemplate call like this (POST)
is logged as GET request on remote NGINX web server.
RestTemplate is registered as Bean with following:
From what i could see from debugging, this method call checks for ssl bundle, but does not call
setRequestMethod()
on the connection object:ClientHttpRequestFactories.prepareConnection()
For reference, default
prepareConnection()
implementation that is invoked when SslBundles are not used (different RequestFactory implementation):SimpleClientHttpRequestFactory.prepareConnection()
The text was updated successfully, but these errors were encountered: