You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Ken Krugler <kk...@transpac.com> on 2009/08/03 23:03:05 UTC

Safe close of connection with partial read of response

Hi all,

I'm trying to keep connections alive so that I can more efficiently  
load a set of pages from one web server domain.

I also don't always read the complete response, to avoid having some  
1GB renegade file from a web server fill up memory.

So if I truncate the response by not reading all of it, what's the  
safe approach to make sure there aren't residual bytes in the server's  
buffer that will get passed back in a subsequent request? Or is that  
even a possibility?

Currently I'm just closing the response.getEntity().getContent()  
InputStream.

Thanks,

-- Ken

--------------------------
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-210-6378


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