commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <>
Subject [HttpClient] Re: Download of file causes connection breakdown with debugging off
Date Mon, 07 Jun 2004 03:51:53 GMT
Hello Ralf,

This sounds quite strange.  The fact that calling getResponseBody() 
fixes the problem leads me to believe that the responses were not being 
fully processed.  When executing a method you must be sure to call 
HttpMethod.releaseConnection() or read the entire method response 
(which implicitly calls HttpMethod.releaseConnection())).  My guess is 
that this was not happening.  If you post some sample code of how you 
are using HttpClient, along with a wire log 
<> we will be 
able to get a better idea of what's happening.


On Jun 4, 2004, at 9:56 AM, wrote:

> Hello everybody,
> I found the following problem:
> With my Web-App ( Bea 6.1 / struts ) I wanted (in fact had to :-) 
> download
> a not so small file ( about 170k ) from a Microsoft IIS server from a 
> partner
> company using NTLM auth.
> When the loglevel was set to debug everything worked fine using the
> authentication as well as the method.getResponseBodyAsStream();.
> As soon as I turned off logging, and the data going over the wire
> was not printed in the logfile, I received only 1-4 IP-Packets
> containing response data, then my machines decreased the receive
> window to 0, and the server doesn't send ( correctly ) any more 
> packages.
> Tested on Linux and Solaris.
> I now bypassed the problem by not using the 
> method.getResponseBodyAsStream()
> but getting the byte[] instead, and putting it into an appropriate
> InputStream.
> What could be the reason for this? When reading the input stream I had
> to do lots of line-based parsing, did i let wait the stream too long,
> means reading too slow? Did anyone else appear such a problem already?
> Kind Regards,
>   Ralf Fischer
> -- 
> Ralf Fischer
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message