cURL / Mailing Lists / curl-users / Single Mail

curl-users

Simple Redirection Problem

From: Michel Barakat <bmichel_at_gmail.com>
Date: Mon, 29 Sep 2008 19:18:43 +0200

Hey folks,

I'm using the libcurl for C++, and I am facing a small problem.
I'm trying to fetch a page (the first page) which redirects to the
another page (the second page).
The problem is that I'm reaching the first page instead of the second page.

The following is set:
curl_easy_setopt(curlHandle, CURLOPT_FOLLOWLOCATION, 1);

I've tried the following without success:
curl_easy_setopt(curlHandle, CURLOPT_AUTOREFERER, 1);
curl_easy_setopt(curlHandle, CURLOPT_REFERER, ";auto");

From the command line, I was able to get the second page by doing:
curl -e ";auto" <page_to_fetch>

I can't figure out though what's the equivalent of -e ";auto" in libcurl.
Any thoughts?

Thanks
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-09-29