Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drain JDK HTTP client response body in all cases
Prior to this commit, when using the `SimpleClientHttpRequestFactory` as a driver for `RestTemplate`, the HTTP response body would only be drained if there was an attempt to read it in the first place. This commit ensures that, even if there's no attempt at reading the response body, it is properly drained when the response is closed to make sure that the connection is released in a proper state and can be put back in the connection pool for reuse. Issue: SPR-17181
- Loading branch information
Showing
3 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters