Hi Can you log a JIRA ticket? Also if you have a fix then you are welcome to provide a patch. http://camel.apache.org/support
On Wed, Oct 30, 2013 at 3:09 PM, Amit <amitpatel2...@gmail.com> wrote: > I found the issue in camel-http4 component. The > HttpProducer.createRequestEntity method has been changed to parse the > contentType. The ContentType.parse method returns "multipart/form-data" > instead of > "multipart/form-data;boundary=---------------------------j2radvtrk". If you > change HttpProducer.createRequestEntity to use ContentType.create method it > works fine. > > > We have below test routes does not work because of above issue. > > <route xmlns="http://camel.apache.org/schema/spring" trace="true"> > <from uri="servlet:///test/1.0/testPOST"/> > <removeHeaders pattern="*"/> > <setProperty propertyName="boundary"> > <groovy> > import org.apache.commons.lang.RandomStringUtils; > > String charset = (('a'..'z') + ('0'..'9')).join(); > Integer length = 9; > return "---------------------------" + > RandomStringUtils.random(length, charset.toCharArray()); > </groovy> > </setProperty> > <setHeader headerName="Content-Type"> > <simple>multipart/form-data;boundary=${property.boundary}</simple> > </setHeader> > <setHeader headerName="Exchange.HTTP_URI"> > <constant>http4://httpbin.org/post</constant> > </setHeader> > <setHeader headerName="CamelHttpMethod"> > <constant>POST</constant> > </setHeader> > <setBody> > <groovy> > > </groovy> > </setBody> > <to > uri="http4://httpbin?httpClient.cookiePolicy=ignoreCookies&httpClient.soTimeout=30000&httpClient.connectionTimeout=30000"/> > <removeProperty propertyName="boundary"/> > <setHeader headerName="Content-Type"> > <constant>application/json</constant> > </setHeader> > </route> > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-HTTP4-2-11-2-ContentType-does-not-returns-multipart-form-data-boundary-j2radvtrk-tp5742407.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen