cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP POST: Determining whether a file could be found

From: Holger Rauch <Holger.Rauch_at_heitec.de>
Date: Mon, 9 Sep 2002 10:54:56 +0200 (CEST)

Hi Daniel!

Thanks a lot for your quick reply!

On Mon, 9 Sep 2002, Daniel Stenberg wrote:

> [...]
> Also, try using the CURLOPT_DEBUGFUNCTION for very detailed information on
> what is sent or received. It gives more information than plain VERBOSE does.

If I understand the curl_easy_setopt man page right, hat means I have to
provide my own callback. Are there any examples for debug functions in the
libcurl distro? I've been looking in the docs/examples subdir, but I
couldn't find any.

> [...]
> Content-Type: multipart/form-data is used by default for multipart formposts,
> but for the request-headers not this single form field.

It's now set to text/xml. Besides, my mistake was that I was using the
wrong field name. Everything works now. My HTTP POSTs don't go to CGI
scripts (as it might be the usual way of doing things), but rather to an
URL that's handled by a specific Apache module. That module expects
certain form field names and I wasn't aware that CURLFORM_COPYNAME is used
to set the name of a particular field in the form. (I've looked at the
examples in the libcurl guide, but I should have been looking at the
curlform_add man page, too.)

> 'Accept: text/xml' - I can't see any reason why you need it, but if you do,
> you should probably set it using CURLOPT_HTTPHEADER to control the HTTP
> request.

I need it, because the server returns XML output. The corresponding MIME
type for that is either "text/xml" or "application/xml". Do you think it's
redundant?

Thanks again!

Greetings,

        Holger

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Received on 2002-09-09