camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: CXF http-conduit AllowChunking does not work
Date Tue, 09 Nov 2010 02:01:45 GMT
Hi Madhav,

Can I have a look at your route?
I think the Transfer-Encoding = chunked value can be filtered by a 
customer CxfHeaderFilterStrategy.

How about just add this configuration ?
<http-conf:conduit name="*.http-conduit">
	<http-conf:client AllowChunking="true"/>
</http-conf:conduit>

Now I need to check the CXF code to see if I can let the http conduit 
just send the chucked request if the protocol header is 
"Transfer-Encoding = chunked".

On 11/4/10 12:33 AM, unmarshall wrote:
>
> Hi All,
>
> I got this working. The problem is that CXF is not smart enough to determine
> that there is a Transfer-Encoding = chunked being set by the server (in my
> case it was tomcat). It defines a threshold value below which it will not
> chunk the body and only if the the size is above the threshold it will chunk
> it.
>
> The problem is that when it decides not to chunk it does not chunk the
> payload but the it does not remove the header. So when the request goes to
> the server it sees that the chunked transfer-encoding has been set but the
> CXF did not chunk the request. So the server throws an exception saying its
> an invalid chunk header.
>
> In Camel HTTP component this has been taken care by having a
> HttpHeaderFilterStrategy and therefore this does not happen if camel http
> endpoints are used instead of CXF.
>
> This in my opinion is a BUG.
>
> The workaround is that the threshold should be set to a very low value so it
> chunks almost all requests.
>
> Best Regards,
> Madhav
>
>
> unmarshall wrote:
>>
>> Hi All,
>>
>> I am using Camel 2.5. I need to disable chunking and for that i have
>> configured the following:
>>
>> <http-conf:conduit name="*.http-conduit">
>> 		<http-conf:client AllowChunking="false"/>
>> </http-conf:conduit>
>>
>>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Mime
View raw message