curl-library
Re: Adding pacparser code to libcurl/curl
Date: Fri, 25 Jan 2008 15:58:23 +0530
On Jan 25, 2008 1:32 PM, Dan Fandrich <dan_at_coneharvesters.com> wrote:
>
> On Fri, Jan 25, 2008 at 01:05:55PM +0530, Manu Garg wrote:
> > pacparser is a C library (and now a python module too) which provides
> > routines that can be used to parse proxy auto-config (PAC) files.
> > (project home page for quick reference:
> > http://code.google.com/p/pacparser). I had started working on
> > pacparser keeping curl in mind. I use curl all the time for testing
> > and I wanted curl to support pac files. Now that I have a working code
> > in C, I'd like to see curl make use of it. It should not be difficult,
> > I guess. There are 3 options IMHO:
> >
> > * Add pacparser code to libcurl. That way all applications using
> > libcurl can make use of it. But, at the same time libcurl becomes
> > dependent on spidermonkey javascript library. However, during
> > compilation we can compile in pac parsing capability only if
> > spidermonkey javascript library is there.
> >
> > * Add pacparser code to curl.
> >
> > * Keep pacparser as a separate library and call pacparser functions
> > inside libcurl/curl code. I don't like this idea much as it will add
> > another layer of dependency (libcurl -> libpacparser -> libjs).
> > Considering the small size of pacparser code, I think it will make
> > sense to add pacparser code itself to libcurl or curl.
> >
> > What do you guys think about it?
>
> We had a discussion here a month ago regarding the libproxy project and
> its integration with curl. I suspect the arguments made there will be
> very applicable to pacparser.
IMO, libproxy and pacparser are quite different. libproxy tries to
identify proxy automagically which doesn't go well with integrating it
with anything. pacparser doesn't do any magic. It takes a PAC file
from user and determine proxy using that file.
--Manu
Received on 2008-01-25