You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Eric Bloch <bl...@laszlosystems.com> on 2003/08/29 07:59:07 UTC

what would an infinite loop in ChunkedInputStream.exhaustInputStream mean?

I am using the httpclient library to implement a caching, converting 
proxy and under some stress situations, I see this method infinite loop.

Any clues?

Thanks!

-Eric



Re: what would an infinite loop in ChunkedInputStream.exhaustInputStream mean?

Posted by Ortwin Glück <or...@nose.ch>.
Adrian Sutton wrote:
> My semi-educated guess would be that the server never stops sending data so
> HttpClient continues to try to read it.  

Don't use HttpClient to get the MP3 stream from a web radio station :-)


Re: what would an infinite loop in ChunkedInputStream.exhaustInputStream mean?

Posted by Adrian Sutton <ad...@intencha.com>.
My semi-educated guess would be that the server never stops sending data so
HttpClient continues to try to read it.  This could either be because the
content-length was an extremely large number (larger than the size of an
int?) or perhaps because chunked encoding was used and the server never
sends the final closing chunk.

Probably an important question is: is it actually in an infinite loop or is
it waiting on data from the server?  It's possible that HttpClient expect
more content than the server sends and so they both wind up sitting their
waiting for each other until one of them eventually times out.

The answer to these questions and more probably lie in the wire trace log -
instructions on generating such a thing can be found at
http://jakarta.apache.org/commons/httpclient/logging.html

Hope that provides some hints anyway.

Regards,

Adrian Sutton.

On 29/08/2003 3:59 PM, "Eric Bloch" <bl...@laszlosystems.com> wrote:

> I am using the httpclient library to implement a caching, converting
> proxy and under some stress situations, I see this method infinite loop.
> 
> Any clues?
> 
> Thanks!
> 
> -Eric
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org
> 

----------------------------------------------
Intencha "tomorrow's technology today"
Ph: 38478913 0422236329
Suite 8/29 Oatland Crescent
Holland Park West 4121
Australia QLD
www.intencha.com