hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohit Anchlia <mohitanch...@gmail.com>
Subject Re: ClientProtocolException
Date Fri, 20 Jan 2012 16:32:36 GMT
I agree, didn't realize that code was setting it manually.

On Fri, Jan 20, 2012 at 1:59 AM, Oleg Kalnichevski <olegk@apache.org> 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
>>         at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
>>         at org.apache.http.impl.client.AbstractHttpClient.execute(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


Mime
View raw message