cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: cURL and .pac files

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 25 Jun 2002 10:40:52 +0200 (MET DST)

On Tue, 25 Jun 2002, Ralph Mitchell wrote:

> To cut a long story short, I slapped the 12 functions on the front of my
> .pac file, pushed it through the SpiderMonkey javascript engine, and got
> correct results for the urls I asked it to check.

You rock Ralph! ;-)

> So, Daniel, barring discussion over licensing (Mozilla uses Netscape Public
> License(duh!) as well as GPL and LGPL), etc, I'd say there's a workable
> .pac interpreter for cURL... All it needs is some thought on bolting the
> two together... I haven't really dug through cURL's source much, so I
> don't have the slightest idea where to put it...

I guess we should keep it an external optional dependency, like we do with
OpenSSL and OpenLDAP already?

We could have the configure script/build system detect SpiderMonkey and take
use of it. Then it would merely be a license "issue" for those that actually
put the pieces together that way and distribute them together. At least the
LGPL option of the license should cause little grief for most users (and
whose who feel they can't work with it would need to live without it or write
a replacement!).

I guess the next step would be you telling us how to proceed to build this
test setup you used to verify this. Then we need to incorporate this into
libcurl in a suitable fashion.

It would basicly be a little libcurl-using client within the library itself,
that would fetch the .pac first, and pass it through SpiderMonkey to figure
out the correct proxy setting and the proceed. The .pac file would then
probably be cached internally and the proxy gets re-evaluated whenever a new
URL is used.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
Received on 2002-06-25