cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] Support for Mozilla's Public Suffix List

From: Tim Ruehsen <tim.ruehsen_at_gmx.de>
Date: Mon, 12 Oct 2015 10:40:20 +0200

On Friday 09 October 2015 23:26:56 Daniel Stenberg wrote:
> 1. try 'make checksrc' and it'll point out a few style nits (or use
> ./configure --enable-debug and then ordinary make invokes will do that for
> you)

Amended.

> 2. there are fprintf() calls left in the code and commented out infof()
> calls

Amended.

> Q: This uses a built-in PSL database within libpsl, right?

Yes.

> Is there any
> support or plans for externally providing an updated PSL? I'm thinking
> perhaps someone who uses libcurl with PSL in systems that have a life time
> expectensy of some time may want to have means to update the db rather than
> to update the lib? (it doesn't really concern this patch, its just a
> general question about libpsl)

lipsl supports to load external PSL files via
        psl_ctx_t *psl_load_file(const char *fname)
or
        psl_ctx_t *psl_load_fp(FILE *fp)

As you say, that would be a second patch, including an additional option for
curl. The logic in cookie.c stays the same, just use psl_load_file() instead
of psl_builtin().

For the next release of libpsl (0.12.0) there will be a helper function to
check if the builtin data is outdated (using the built-in filename/mtime and
the file mtime from the filesystem). And if so, the application could use
psl_load_file(psl_builtin_filename()) instead of psl_builtin().
Right now, the application has to stat() and compare
mtime/psl_builtin_file_time() explicitly - same functionality but a bit more
code.

Right now I am busy, but if someone requests such a feature, give me a ping.

BTW, checksrc is a cool helper.

Regards, Tim

Received on 2015-10-12