[
https://issues.apache.org/jira/browse/HTTPCLIENT-1588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oleg Kalnichevski resolved HTTPCLIENT-1588.
-------------------------------------------
Resolution: Fixed
Fix Version/s: 4.4 Beta2
Both ways are absolutely equivalent. Both calls end up releasing the underlying
connection back to the connection manager. For consistency sake, though, I
changed this method to close the response object from a finally clause.
Oleg
> CloseableHttpClient.execute do not close CloseableHttpResponse
> --------------------------------------------------------------
>
> Key: HTTPCLIENT-1588
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1588
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.3.6
> Reporter: Marcin Kamionowski
> Fix For: 4.4 Beta2
>
>
> CloseableHttpClient.execute in line 214 contains:
> {code}
> final HttpResponse response = execute(target, request, context);
> {code}
> The response real type is CloseableHttpResponse so it must be closed before
> returning result or throwing exception
> (https://hc.apache.org/httpcomponents-client-ga/quickstart.html)
> Currently it only close InputStream returned from HttpEntity.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]