Thank you Geert.  I think there is some misunderstanding :-) So a few
random points:

1/ not sure what you mean by "marking actual file contents with
form-data disposition", but yes, the HTML spec and RFC 2388 mandates
the HTTP request has the MIME type multipart/form-data, and each entry
to be have a `Content-Disposition: form-data` as far as I can see

2/ not sure what `embed` and `attachement` mean (at least, not in the
context of a request, for the latter)

3/ these CURL commands are replicating what is sent by a "simple form"
which was the starting point for all this

4/ I did replicate it with Postman as well (but it does not allow you
to set the Content-Type for one form-data part, as far as I could see,
so I could only test with application/octet-stream, and it indeed gets
the same result as the corresponding CURL command and what I observe
in the form).

I am running out of idea :-(

Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/


On 27 November 2015 at 11:00, Geert Josten wrote:
> Yes, multipart/form-data is what you put in HTML, but that doesn’t have to
> mean that the actual file contents is marked with form-data disposition.
> You also have embed, attachment, etc. Make a simple form, and try to
> capture what is sent across the wire exactly, and then see if you can
> mimic the exact same with curl or maybe postman..
>
> Cheers
>
> On 11/27/15, 9:34 AM, "[email protected] on behalf
> of Florent Georges" <[email protected] on behalf of
> [email protected]> wrote:
>
>>On 27 November 2015 at 06:49, Geert Josten wrote:
>>
>>> Maybe it is because it is marked as form-data, instead of as attachment.
>>> Have you compared with a simple html upload form?
>>
>>Not sure to understand.  Setting enctype="multipart/form-data" is the
>>idiomatic, simple way for a HTML form to upload a file, isn't it?
>>
>>> I¹m sure that worked just fine for me in the past..
>>
>>Yup...  What bothers me is that the handling of the file content is
>>different based on the Content-Type of the corresponding part (read as
>>a binary node for application/octet-stream and as a text node for
>>text/xml).  In that case, I can't make sense of having a text node
>>instead of an XML tree for text/xml.
>>
>>Regards,
>>
>>--
>>Florent Georges
>>http://fgeorges.org/
>>http://h2oconsulting.be/
>>_______________________________________________
>>General mailing list
>>[email protected]
>>Manage your subscription at:
>>http://developer.marklogic.com/mailman/listinfo/general
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to