hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hankin, Keith" <khan...@amazon.com>
Subject Connection gets closed on GET operation
Date Wed, 08 Feb 2006 00:47:09 GMT
I'm doing a very simple GET operation using regular (non-SSL) http access. I
call the Method.getResponseBodyAsStream() method and do a couple of reads to read a few bytes.
My third read fails with exception "java.io.IOException: Attempted read on closed
stream", yet I have not closed the stream.

I'm noting that the connection is of
class org.apache.commons.httpclient.AutoCloseInputStream, so maybe it's self
closing? I've looked at the code for this class and it says that it closes the
Connection when no more content, but I have only read the first couple of bytes of data.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message