hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: HttpUriRequest.abort vs EntityUtils.consume
Date Wed, 04 Jan 2012 16:45:33 GMT
Date: Wed, 04 Jan 2012 17:29:10 +0100
From: Oleg Kalnichevski <olegk@apache.org>
To: HttpClient User Discussion <httpclient-users@hc.apache.org>
Subject: Re: HttpUriRequest.abort vs EntityUtils.consume
Message-ID: <1325694550.2905.2.camel@ubuntu>
X-Mailer: Evolution 3.2.1-

On Fri, 2011-12-30 at 07:23 -0500, Chad La Joie wrote:
> In cases where there is no body, or you don't care about the body, in
> the response is there a difference between calling abort() on the
> request and using EntityUtils.consume on the response?
> 

EntityUtils#consume attempts to keep the connection alive by reading the
message until the end of stream, while HttpUriRequest#abort simply shuts
down the underlying connection.

Oleg 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message