HttpClient appears to clean up these situations for us.
I have not been able to find it in the code. Perhaps it's java itself actually:
Prior to JDK 6, if an application closes a HTTP InputStream when more than a small amount of data remains to be read, then the connection had to be closed, rather than being cached. Now in JDK 6, the behavior is to read up to 512 Kbytes off the connection in a background thread, thus allowing the connection to be reused. The exact amount of data which may be read is configurable through the http.KeepAlive.remainingData system property.
All the more reason to do it right our self if so.
It may be the case that simply closing the inputstream is all we need to do:
if the response body is long and you are not interested in the rest of it after seeing the beginning, you can close the InputStream.
But, that may usually work, but not always:
But you need to be aware that more data could be on its way. Thus the connection may not be cleared for reuse.
So I see great connection reuse in tests, but this is all hairy stuff. We need to consume these streams just to be sure we are hitting every case.