cURL / Mailing Lists / curl-library / Single Mail


Re: Multiple calls to curl_easy_perform()

From: Daniel Stenberg <>
Date: Thu, 19 Feb 2004 15:21:22 +0100 (CET)

On Thu, 19 Feb 2004, [iso-8859-2] Miko?aj Rydzewski wrote:

> Manual says that it is possible to call curl_easy_perform() multiply times
> while using the same handle.

That's correct.

> But the following code doesn't work for me:
> ...
> cur_easy_setopt(h, CURLOPT_URL, url1);
> curl_easy_perform(h);
> ...
> cur_easy_setopt(h, CURLOPT_URL, url2);
> curl_easy_perform(h);
> ...
> Second call returns the same page as the first one. Does libcurl clear all
> options after making perform()?

This has been done by numerous people all over. The curl command line tool
does it even, used frequently all over.

Please provide a full source code example (as small as possible) that shows
the problem and I'm sure we can find the flaw.

Also, make sure you use a recent libcurl version.

    Daniel Stenberg -- --
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-02-19