Content Type - Message Boundary issue in YouTube upload
Date: Tue, 13 Jan 2009 10:28:01 +0530
I should also mention that If I remove any one of the 3 Content-Type header
postings, it gives an error saying the following:
multipart/form-data;boundary=----------------------------69b30b792cb8 is not
where as the boundary se by me is as follows:
Content-Type: multipart/related; boundary="f93dcbA3"*
Thanks & Regards,
---------- Forwarded message ----------
From: Tanmay Anjaria <tanmay.anjaria_at_gmail.com>
Date: Tue, Jan 13, 2009 at 10:12 AM
Subject: YouTube upload - Message Boundary issue
To: libcurl development <curl-library_at_cool.haxx.se>
Thanks for the inputs regarding the header sending. I went through
HTTPHEADER documents and found the reference to *formadd* which suited me.
and I'm using that now.
There is still one hurdle that I can see for uploading the video file to
Please find below the posts I need to make for video upload.
POST /feeds/api/users/default/uploads HTTP/1.1
Authorization: AuthSub token="*<authentication_token>*"
Content-Type: multipart/related; boundary="*<boundary_string>*"
Content-Type: application/atom+xml; charset=UTF-8
*<Binary File Data>*
I have posted all of these already. While calling the curl perform, it comes
out with an error saying
*"Invalid repeating query parameteterContent-Type:*"
Clearly, this suggests that as we are using 3 Content-Type header requests,
it is giving an error.
*Does it have to do something with the message boundary?*
Because, as I searched on net, one document said:
*In the case of multiple part messages, in which one or more different sets
of data are combined in a single body, a "multipart" Content-Type field must
appear in the entity's header.*
I think, because the message boundary is not set or not valid, the execution
takes all the 3 content-types posted by me for single data body. Where as
there must be boundary string inserted between all of the 3 content-type
fields so that the execution can understand that these 3 Contetn-Type posts
are for different data bodies.
Can someone please throw some light on *how can we insert message
Considering the variety of cURL API usage and relevance of the program I'm
developing, I'm thinking of uploading it once it finishes successfully. So
that others can use it for reference.
Thanks & Regards,
Received on 2009-01-13