[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reading multipart mime dataformat

Here is the example:


On 08/06/18 09:44, Claus Ibsen wrote:
Hi Tom

I am afraid what we have is the docs you can find, but they are more
up to date on github

If you can build an unit test - reproducer sample project you are
welcome to log a JIRA and attach - link to that.
Also if possible try to test with latest released version.

We should try to get this fixed so it works via a plain curl command.

On Thu, Jun 7, 2018 at 6:00 PM, Tim Dudgeon <tdudgeon.ml@xxxxxxxxx> wrote:
I'm wanting to send a small set of files to a HTTP server as a POST request
and have Camel handle the request.

Seems like one way of doing this is to use curl on the sending end to create
the POST request and have the Camel MIME-Multipart data format [1] handle
the request on the receiving end. So I set up a simple test. My camel route
contains this:

             .log("POSTed data\n${body}")

On the sending end I post some simple test data like this:

     curl -X POST -F name=superman -F power=flying

This generates a body that looks like this:

Content-Disposition: form-data; name="name"

Content-Disposition: form-data; name="power"


But Camel fails to handle this with this error:

javax.mail.internet.ParseException: Missing start boundary
         at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:691)

Any hints on how to get this working? The documentation page doesn't contain
much info for reading multipart requests, only writing them :-(

[1] http://camel.apache.org/mime-multipart.html