After switching from spring-web:6.2.6
to spring-web:6.2.8
one of the tests in our app stopped working.
After some investigation we found out that TestRestTemplate
was not sending a request body when making a DELETE request:
val body = HttpEntity("""["1","2"]""", headers)
testRestTemplate.exchange("/v1/messages", HttpMethod.DELETE, body, String::class.java).also {
assertEquals(HttpStatus.OK, it.statusCode)
}
Digging a bit further, we found out that in spring-web:6.2.8
this logic has been introduced, which eventually creates a DELETE request without a body:
@Override
public HttpRequest.Builder DELETE() {
return method0("DELETE", null);
}
Could someone have a look at it please?
Let me know if you need more information.
Comment From: bclozel
Thanks for your report @lazysasha , this will be fixed in the next maintenance release.