cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using curl lib for files download

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Wed, 31 Dec 2008 09:55:30 -0600

On Wed, Dec 31, 2008 at 5:54 AM, Jeff Pohlmeyer <yetanothergeek_at_gmail.com>wrote:

> On Dec 31, 2008 <sergei.trofimov_at_gmail.com> wrote:
>
> > Do libcurl understand autoproxy or problem is how
> > autoproxy configured in my env?
>
> No, libcurl does not understand autoproxy. For that you will
> probably need some additional library, e.g.
> http://code.google.com/p/pacparser/
>
>
> > ISSUE 2: Even with proper proxy I can't download files from
> > registrationcenter.intel.com. Probably issue is how this server
> > configured but I want to be sure.
>
> I have tried from here, downloading the "w_cc_c_10.0.026_ia32.exe"
> file from intel using the curl command-line tool directly, and through
> a local squid proxy, and it seems to work just fine either way, with no
> special cookies, user-agent, or referer headers required, so I'm afraid
> I can't help you much in debugging a problem I can't see.
>
> Maybe someone else here has experience with PAC / WPAD / autoproxy
> that can help...
>

Now there's something that looks more useful than what I worked out in June
2002. Check the list archive for my full reply - here's a condensed version
from '06:

I had some success pushing javascript through the Spidermonkey
javascript interpreter, to process a proxy autoconfig file. Even
then, I found some of the "builtin" functions were not actually built
into the interpreter. I had to dig them out of the Mozilla source,
where they were stored as javascript. Are you prepared to dig out all
the other "builtins" that aren't??

Take a look in the mailing list archives for more details on that.
Around June 26 2002, I think.

I believe back then it was decided that it wasn't worth adding a whole
javascript interpreter just for the occasional need to handle autoconfigs.

What I ended up with was a bash script that fetched the autoconfig using
curl, stuffed in the required functions at the top and a call to the proxy
function at the bottom. That was then passed through Spidermonkey to get
the result. The bash script either returned the name of the proxy or
DIRECT.

Ralph Mitchell
Received on 2008-12-31