Haxx ad

curl's project page on


cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Trying to http post xml file - Memory fault(coredump)

From: <>
Date: Tue, 20 Jun 2006 16:51:14 -0000

stop messing with the Content-Type: header, you HAVE to multi-part post if
you want to include a file. libcurl will take care of this for you.


On Tue, Jun 20, 2006, "Shrestha, Anupama" <> said:

> test.xml is the name of the xml document. I am trying to post and sitting in the same directory where the code is
> headerlist = curl_slist_append(headerlist, "Content-Type: application/x-www-form-urlencoded");
> curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
> curl_formadd(&post, &last, CURLFORM_COPYNAME,"project",CURLFORM_FILE,"test.xml",CURLFORM_END);
> curl_easy_setopt(curl, CURLOPT_POST, post);
> Do I need to open and read the file?

m. allan noah
IT Director,
ph# (804) 355-5489
tf# (866) 724-9722
fx# (804) 355-0477
Received on 2006-06-20

These mail archives are generated by hypermail.

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

File upload with ASP.NET