Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 35784 invoked from network); 26 Apr 2008 09:53:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Apr 2008 09:53:49 -0000 Received: (qmail 68715 invoked by uid 500); 26 Apr 2008 09:53:51 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 68684 invoked by uid 500); 26 Apr 2008 09:53:50 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 68673 invoked by uid 99); 26 Apr 2008 09:53:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Apr 2008 02:53:50 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [217.150.250.44] (HELO ok2consulting.nine.ch) (217.150.250.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Apr 2008 09:52:57 +0000 Received: by ok2consulting.nine.ch (Postfix, from userid 1002) id BFA30198471; Sat, 26 Apr 2008 11:53:17 +0200 (CEST) Received: from [192.168.1.100] (84-75-131-194.dclient.hispeed.ch [84.75.131.194]) by ok2consulting.nine.ch (Postfix) with ESMTP id 4504C198040 for ; Sat, 26 Apr 2008 11:53:17 +0200 (CEST) Subject: Re: HttpPost, returned Entity is not consuming input on writeTo() From: Oleg Kalnichevski To: HttpComponents Project In-Reply-To: <200804212051.42178.jw_list@headissue.com> References: <200804212051.42178.jw_list@headissue.com> Content-Type: text/plain Date: Sat, 26 Apr 2008 11:53:12 +0200 Message-Id: <1209203592.5912.0.camel@ubuntu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on ok2consulting.nine.ch X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=ham version=3.0.3 On Mon, 2008-04-21 at 20:51 +0200, Jens Wilke wrote: > Hi all, > > I am testing with http-client-4.0-alha3. > > Roughly, I have this code: > > HttpPost p = new HttpPost(url...); > p.setEntity(entity....); > HttpResponse r = httpClient.execute(p); > HttpEntity ent = r.getEntity(); > OutputStream out = ... > ent.writeTo(out); > // we need this seperate call, so the connection is released > ent.consumeContent(); > out.close(); > > The extra consumeContent() call is needed so that the connection gets freed. > However, I would expect writeTo() is doing this, since it processes the whole input. > > Bug or feature? ;) > Jens, I fixed the problem on SVN trunk Oleg > Best, > > Jens > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org