Hi Willem, Apologies for a late response. It was festive season here and therefore a delay.
The problem is solved when i set the chunking threshold as: <http-conf:conduit name="*.http-conduit"> <http-conf:client ChunkingThreshold="50" /> </http-conf:conduit> By default AllowChunking is true and you do not have to set it. Even if you set it to false it will not change the request header if the Transfer-Encoding header is already present. The problem is surely in CXF but i was hoping that the CXF-Camel component can re-use HttpHeaderFilterStrategy to filter out common headers. This solution looks more like a hack. Ideally CXF should take care of checking for certain headers and then club it together with its logic for automatically enabling chunking beyond a certain threshold. Best Regards, Madhav Willem.Jiang wrote: > > 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 > > -- View this message in context: http://camel.465427.n5.nabble.com/CXF-http-conduit-AllowChunking-does-not-work-tp3247495p3256505.html Sent from the Camel - Users mailing list archive at Nabble.com.