cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Problem posting XML (content is not allowed in prolog)

From: BINETTE Pascal <pbinette_at_imds-world.com>
Date: Wed, 18 Feb 2009 08:33:13 -0500

>The enctype spells out multipart/form-data. So that's what you should use, and
>then there's no particular encoding for you to do.

I'm a bit of a newbie when it comes to web programming. When you say I should you the multipart encoding, do you simply mean that I should add the file content using the curl_formadd() function, or is there additional headers to add as well?

>Try CURLFORM_FILE instead of CURLFORM_COPYCONTENTS to let libcurl read and
>deal with the file on its own.

I tried that as well, but I get the same results.

>Do you have any other tool/client that speaks the correct protocol? Can you
>compare what that sends with what your libcurl client sends?

I can easily get this with Visual Basic using the .NET objects such as HTTPWebRequest, however I need to develop this application in a native Visual C++ / MFC application. IF I can't get this to work, I might simply create a DLL using VB to use from C++ (not ideal, but it should work).

Do you know a tool or website that can show me what my application is sending to the server? Otherwise I'm trying to see if Tomcat can log those requests.

Received on 2009-02-18