cURL / Mailing Lists / curl-library / Single Mail


Adding pacparser code to libcurl/curl

From: Manu Garg <>
Date: Fri, 25 Jan 2008 13:05:55 +0530

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: 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?


Manu Garg
"Journey is the destination of life."
Received on 2008-01-25