cURL / Mailing Lists / curl-library / Single Mail

curl-library

WRITEFUNCTION and redirects

From: Mark Fletcher <markf_at_bloglines.com>
Date: Sat, 02 Aug 2003 17:56:48 -0700

(message originally sent from the wrong email address)

Hello,

We use CURLOPT_WRITEFUNCTION to grab and save the web pages we fetch.
According to the docs, that function can be called multiple times, and
that's fine. But what we're seeing with redirects is that the function
is first called with data representing the redirect response, and then
it's called again with the actual page after the redirect.

Is there a good way for our write function to know when to ignore data
and when not to? Ideally, if I have FOLLOWLOCATION set to 1, that the
write function doesn't get called except for the actual page.

Thanks,

Mark

--
Mark Fletcher
Bloglines
http://www.bloglines.com
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-03