mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
08e6d762d2
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