cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: How to change Content-Type & boundary?

From: 时有 <shiyou_at_nextbase.cn>
Date: Sat, 15 Sep 2007 12:46:30 +0800

Hi,Daniel:

   Thanks for your help.^_^

On Fri, 14 Sep 2007, I have wrote:

> I have some problem with change the Conten-Type & boundary,please help: I
> changed content-type in the header: Content-Type:
> multipart/related;boundary="END_OF_PART",

On Fri, 14 Sep 2007 12:56:32 , Daniel Stenberg wrote:

>>libcurl doesn't really support this operation. If you're not happy with
>>libcurl's multipart formpost as done built-in, you're better off:

>>1) using a normal POST and then handicraft the rest yourself in your
>>application.

  ok,I consider that way,beacuse we want to upload Image, when using multipart-post
that easyily just set CURLFORM_FILE to file path.
  When using normal POST we should copy file content handicraft and get content length
by ourself,is that right?I found thing easier with PHP,but how to do with C?
  I want Post things like follow. May be you can give some suggestion:

Content-Type: multipart/related; boundary="END_OF_PART"
Content-Length: 24680246
MIME-version: 1.0

Media multipart posting
--END_OF_PART
Content-Type: application/atom+xml

<entry xmlns='http://www.w3.org/2005/Atom'>
  <title>darcy-beach.jpg</title>
  <summary>Darcy on the beach</summary>
  <category scheme="http://schemas.google.com/g/2005#kind"
    term="http://schemas.google.com/photos/2007#photo"/>
</entry>
--END_OF_PART

Content-Type: image/jpeg

...binary image data goes here...//how to do this with curl c api?
--END_OF_PART--
  
>>2) work on a patch that allows an application to alter the necessary pieces
Is that curl patch? I searched the mailing list and found that someone metion this.

Another question: Now I get curl-library Digest,it's helpful.But when I reply it's difficult.
 Can I received mail one by one?

BR
Aaron shi
2007-09-15
Received on 2007-09-15

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET