cURL / Mailing Lists / curl-users / Single Mail


Re: GET reply problem

From: Daniel Stenberg <>
Date: Thu, 16 Jun 2005 10:29:01 +0200 (CEST)

On Thu, 16 Jun 2005, Pedro Neves wrote:

> I did not understood. I should call fclose() after curl_easy_perform()? I
> thought I should call fclose() in the callback function that I have created
> to open the file.

You just need to make sure that the file handle is closed or flushed when you
read the file from aother process, as otherwise your app might have outgoing
data still buffered.

> I think that my problem with libcurl can also be related with the fact that
> I am using _only one_ handle for all my program. I create the handle in the
> beginning of the main function and I use it until the end. Is this ok? Or
> should I use one handle for each GET operation that I perform?

curl handle you mean? Yes, that is perfectly fine, and even encouraged.

  Commercial curl and libcurl Technical Support:
Received on 2005-06-16