Hi,

I'm using httpclient 3.1 and have the following problem:

After successfully sending a GET request I use getResponseBodyAsStream() to get 
access to the InputStream with the returned data (The server uses chunked 
transfer).
While reading from the InputStream the server sending the result crashes. It's 
still possible to read from the InputStream to some point (guess some data is 
buffered in the socket), but of course not all of the expected data. Reading 
from the InputStream stops because -1 is returned by read() which denotes 
EndOfStream. But this EndOfStream is not reached because all of the data was 
transferred but because the connection is lost.  I would have expected that 
read() throws an IOException as the chunked transfer ended in the middle of 
communication. Is there any other way to find out that the EndOfStream was 
reached because of some internal problem ? Checking Content-Length is not an 
option because chunked transfer is used.

Bye,
Daniel


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to