Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 93583 invoked from network); 4 Mar 2004 02:31:12 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 Mar 2004 02:31:12 -0000 Received: (qmail 17866 invoked by uid 500); 4 Mar 2004 02:30:55 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 17697 invoked by uid 500); 4 Mar 2004 02:30:53 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 17680 invoked from network); 4 Mar 2004 02:30:53 -0000 Received: from unknown (HELO mail.stone-ware.com) (216.136.78.196) by daedalus.apache.org with SMTP; 4 Mar 2004 02:30:53 -0000 Received: from StonewareDom-MTA by mail.stone-ware.com with Novell_GroupWise; Wed, 03 Mar 2004 21:30:51 -0500 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.0.1 Date: Wed, 03 Mar 2004 21:30:26 -0500 From: "Tony Thompson" To: , Subject: Re: HTTP client hang Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Mike, It may be tough to get a wire log because I am seeing this at a customer site and they may be sensitive about their data. I will check into it though. Here is roughly what I do: 1. I create a POST method and set the following method.setPath(); method.setQueryString(); method.setRequestBody( ); method.setFollowRedirects( false ); 2. Execute the method status = m_httpClient.executeMethod( method ); 3. Copy the response to an OutputStream InputStream content = method.getResponseBodyAsStream(); if( content != null ) { copy( content, outputStream, -1 ); } I guess I may have been a bit harsh when I said the client hangs. From my perspective, it hangs because I don't ever get all of the data back that I should. It seems like the HTTP client has set the socket receive buffer really small and it can't receive the entire response. After looking at the packet trace, the client receives exactly 24KB (24576 bytes) of the response and then shuts down the socket (the full response is around 27KB). I am sure that my code is functional. I have already submitted several other requests to this host before this one fails. Hopefully that helps a bit. Tony >>> becke@u.washington.edu 03/03/04 08:22PM >>> Hi Tony, Can you give an example of the code you are using, and where exactly things are hanging? Also, a wire log may also be helpful . Mike On Mar 3, 2004, at 2:32 PM, Tony Thompson wrote: > I am having an issue with the HTTP client hanging when it is trying to > receive a large amount of data from a web server. After doing a packet > trace, I noticed that as the HTTP client is receiving a large amount of > data, the TCP window size goes to zero and communication just stops. > Is > there something I need to configure differently to get around this > situation? > > I am using JDK 1.4.2 but, I have tried different JVMs and it doesn't > make any difference. The response that the client is receiving is in > response to a POST and it is coming back in several continuation > packets > (don't know if that matters). > > Thanks. > Tony > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > commons-httpclient-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: > commons-httpclient-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org