Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3A07DBBE6 for ; Fri, 20 Jan 2012 16:33:07 +0000 (UTC) Received: (qmail 64442 invoked by uid 500); 20 Jan 2012 16:33:06 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 64374 invoked by uid 500); 20 Jan 2012 16:33:06 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 64366 invoked by uid 99); 20 Jan 2012 16:33:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jan 2012 16:33:05 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mohitanchlia@gmail.com designates 209.85.210.51 as permitted sender) Received: from [209.85.210.51] (HELO mail-pz0-f51.google.com) (209.85.210.51) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jan 2012 16:32:58 +0000 Received: by dadn15 with SMTP id n15so362963dad.10 for ; Fri, 20 Jan 2012 08:32:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=P9MFguNBTISNkk/+I5PstbP0EataTUxqFirS6dzsRgI=; b=UnC8VAwCSVMwmOL8fEIephRBrLmMbv77Ao2lOYs5TcOC2QBEO5TCmvrxU5pxdS31mR Z7nVTUIE+8j846fkHjmx0/525zpKbGTDPRWXeWRBMnWl+oJZ+ArzLlT09FWy34oppieD 40vdVJnurM07Z1hrAeUso+Gn47z52U29zdyiI= MIME-Version: 1.0 Received: by 10.68.115.108 with SMTP id jn12mr63415386pbb.54.1327077157068; Fri, 20 Jan 2012 08:32:37 -0800 (PST) Received: by 10.68.35.40 with HTTP; Fri, 20 Jan 2012 08:32:36 -0800 (PST) In-Reply-To: <1327053546.13371.14.camel@ubuntu> References: <1327053546.13371.14.camel@ubuntu> Date: Fri, 20 Jan 2012 08:32:36 -0800 Message-ID: Subject: Re: ClientProtocolException From: Mohit Anchlia To: HttpClient User Discussion Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I agree, didn't realize that code was setting it manually. On Fri, Jan 20, 2012 at 1:59 AM, Oleg Kalnichevski wrote= : > On Thu, 2012-01-19 at 15:02 -0800, Mohit Anchlia wrote: >> When we do a POST we are getting the following exception? >> Transfer-encoding is set chunked. Not sure why it's throwing this >> exception >> >> org.apache.http.client.ClientProtocolException >> =A0 =A0 =A0 =A0 at org.apache.http.impl.client.AbstractHttpClient.execut= e(AbstractHttpClient.java:822) >> =A0 =A0 =A0 =A0 at org.apache.http.impl.client.AbstractHttpClient.execut= e(AbstractHttpClient.java:754) >> >> Caused by: org.apache.http.ProtocolException: Transfer-encoding header >> already present >> > > You'll be much better off not messing with entity delineating headers > such as 'transfer-encoding' and 'content-length' and letting HttpClient > generate them for you. > > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org > For additional commands, e-mail: httpclient-users-help@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org