cURL / Mailing Lists / curl-library / Single Mail


Re: Correct use of curl_easy_getinfo

From: Daniel Stenberg <>
Date: Mon, 5 Dec 2011 16:14:20 +0100 (CET)

On Mon, 5 Dec 2011, Till Elsner wrote:

> 21 /* set url */
> 22 curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &doc_info->url);


CURLINFO_EFFECTIVE_URL returns a mere pointer to a buffer inside of the easy

When you reset that handle I would guess the pointer suddenly points to a
either something blank or to memory that previously was allocated and now are

You probably need to clone the data that pointer points to before you reset or
close the easy handle, then you can use that data to set the URL in the
subsequent request!

List admin:
Received on 2011-12-05