cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Limiting IP addresses CURL is allowed to connect to.

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Mon, 4 Aug 2008 08:38:18 -0500

On Mon, Aug 4, 2008 at 8:22 AM, Sam Olsen <psyzzle_at_gmail.com> wrote:

> Hi,
>
> I've found myself wanting to control the IP address scope of applications
> using libcurl in
> FOLLOWLOCATION mode several times, and it is now a requirement for one of
> the projects
> I'm working on. I'm basically using libcurl to crawl websites and would
> like to somehow prevent
> the crawler from hitting unintended sites.
>
> Is there someway to accomplish what I want with the current version of
> libcurl?
>

Why not just turn off FOLLOWLOCATION and handle all the redirects
yourself?? Are you planning on handling other kinds of redirects, such as
"meta refresh" tags and self-submitting forms?? Just deal with "Location"
headers the same way.

Ralph Mitchell
Received on 2008-08-04