cURL / Mailing Lists / curl-library / Single Mail


Content Type - Message Boundary issue in YouTube upload

From: Tanmay Anjaria <>
Date: Tue, 13 Jan 2009 21:08:58 +0530


I've noticed something which may be causing the problem in my case for
uploading the video.

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.

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

even after setting this, I get Content-Type as form-data only. Any
idea why is this happening?

I want the Content-Type to be set as multipart/related. I'm thinking
that multipart/related is not set because when I see the pcap file in
WireShark after running my program, I see *Content-Disposition:
form-data;* instead of multipart/related.

I'm giving the list of HTTP posts to be done by me to youtube once again:


POST /feeds/api/users/default/uploads HTTP/1.1
Authorization: AuthSub token="<authentication_token>"
GData-Version: 2
X-GData-Client: <client_id>
X-GData-Key: key=<developer_key>
Slug: <video_filename>
Content-Type: multipart/related; boundary="<boundary_string>"
Content-Length: <content_length>
Connection: close

Content-Type: application/atom+xml; charset=UTF-8

Content-Type: video/mp4
Content-Transfer-Encoding: binary

<Binary File Data>


Thanks & Regards,
Tanmay Anjaria
Received on 2009-01-13