Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.3.3
-
None
Description
Quick start says:
// The underlying HTTP connection is still held by the response object
// to allow the response content to be streamed directly from the network socket.
// In order to ensure correct deallocation of system resources
// the user MUST either fully consume the response content or abort request
// execution by calling CloseableHttpResponse#close().
but the user guide says:
The difference between closing the content stream and closing the response is that the former will attempt to keep the underlying connection alive by consuming the entity content while the latter immediately shuts down and discards the connection.
This is a contradiction. The code which follows in the quick start is correct but not the comment. Even if I consume the response content the underlying connection is still help open.