cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Previous problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 10 Sep 2001 15:12:33 +0200 (MET DST)

On Mon, 10 Sep 2001, Christie, Darren wrote:

> Having spent a long time investigating my previous problem. I think the
> cause of libcurl (version 7.8 and 7.8.1)falling over and causing windows
> to kick up an exception is to do with proxy server settings. If I set
> the proxy server options my program works, if I don't it causes the read
> memory error.

Actually, your example program had several errors and I did point out the
most obvious one. You did (still do?) use CURLOPT_FILE without specifying the
CURLOPT_WRITEFUNCTION. That is not "legal" on windows.

Two other problems:

> curlRes = curl_easy_setopt(curl,CURLOPT_HEADER);

This didn't specify the third argument, TRUE or FALSE must be added.

> curlRes = curl_easy_setopt(curl,CURLOPT_ERRORBUFFER);

This is a serious error, it should provide a pointer to a buffer as a third
argument. The buffer must be at least CURL_ERROR_SIZE bytes big.

> curlRes = curl_easy_setopt(curl, CURLOPT_MUTE, 1);

Obsolete. The MUTE option doesn't do anything in 7.8 and later.

> I need to be able to do either. Is my problem related to the fact I am
> trying to test not using the proxy settings, while actually needing them.

Well, using proxy or not of course make libcurl work slightly different
internally, but both with and without is of course supposed to work
flawlessly.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-09-10