curl-library
Re: get several pages instead of one with cookies
Date: Sat, 11 Dec 2004 12:15:35 +0100 (CET)
On Sat, 11 Dec 2004, Ilann Cohen wrote:
> [curl/libcurl v7.11.1 on a Windows i686 with Cygwin system]
7.11.1 is pretty old. Consider updating.
> It works fine, except that when I fetch page 2, I get pages 1 to 2, when I
> fetch page 3, I get pages 1 to 3 etc. I mean that libcurl returns a buffer
> containing all previous pages, concatenated to each other !!
That's not what libcurl does. It is your code that appends the contents of
page 2 to to the contents of page 1.
Based on your snippet, it looks like a modified getinmemory.c example where
you don't reset things in between the requests.
> What's going on when you call curl_easy_setopt(curl_handle, CURLOPT_URL,
> url_name) several times with the same handle ?
Every time you set CURLOPT_URL, it clears the previous setting and stores the
new one you provide. Setting it multiple times before you call
curl_easy_perform() would only be stupid.
> Do I have to clean something before setting a new url ?
No.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-12-11