cURL / Mailing Lists / curl-library / Single Mail


Re: Content Type - Message Boundary issue in YouTube upload

From: Daniel Stenberg <>
Date: Tue, 13 Jan 2009 18:12:03 +0100 (CET)

On Tue, 13 Jan 2009, Tanmay Anjaria wrote:

> I captured the network traffic while uploading video through youtube website
> and then captured the network traffic while running my program.
> In the captured pcap file while uploading video through web site, it shows
> *Content-Disposition: form-data;* for every header.
> and in my case too, it shows the same thing, which should not be the case.

I don't follow you. It uses that header when you're "uploading video through
youtube website" and "in my case too". Isn't that good then?

Anyway, libcurl does those headers since you're doing a multipart formpost.

> As I'm setting *- Content-Type: multipart/related; boundary="
> <boundary_string>"*

Since libcurl does the boundary strings within the body, between the
formparts, it also has to do it in the Content-Type: header and thus you
cannot replace that header when doing multipart formposts. I wouldn't mind
having such abilities, but there aren't any such right now.

If the multipart formpost behavior isn't what you like/need/want, you'll need
to do it all yourself with the "normal" POST approach.

Received on 2009-01-13