On 06/12/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello Sebastian, > > which connection manager are you using? > Java HTTP manages a pool by default, while > HttpClient by default uses SimpleHCM with > only one connection. > > Do you shut down the CM when exiting?
Here's the HttpClient code: HttpClient client = new HttpClient(); HttpMethod method = new GetMethod(URL); HttpParams params = DefaultHttpParams.getDefaultParams(); params.setParameter(HttpMethodParams.COOKIE_POLICY,CookiePolicy.IGNORE_COOKIES); method.setRequestHeader(HEADER_CONNECTION, keepalive ? KEEP_ALIVE : CONNECTION_CLOSE); method.setFollowRedirects(autoredirect); client.executeMethod(method); System.out.println(method.getURI().toString()); showHeader(method,"Connection"); showHeader(method,"Location"); int sc = method.getStatusCode(); InputStream is = method.getResponseBodyAsStream(); long l = 0; while(is.read()>=0){ l++; } method.releaseConnection(); System.out.println("Response Code: "+sc+" size: "+l); I can upload the entire app to my home dir if need be. > cheers, > Roland > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]