BTW, I did read the section titled "Ensuring release of low level
resources" on the http://hc.apache.org/httpcomponents-client/tutorial/html/fundamentals.html
page. This recommends using abort() to clean things up, but that
would seem to kill the keep-alive connection.
So a better way to ask my question is whether there's any approach
that keeps the connection alive, without consuming all of the content.
I'm thinking the answer is no, but I wanted to confirm.
Thanks,
-- Ken
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
========================================================================
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.
--------------------------
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-210-6378
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]