mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Prior to this commit, `RestTestClient` tests could only perform expectations on the response without consuming the body. In this case, the client could leak HTTP connections with the underlying HTTP library because the response was not entirely read. This commit ensures that the response is always fully drained before performing expectations. The client is configured to buffer the response content, so further body expectations are always possible. Fixes gh-35784