curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Cookie storage customization?

From: Isaac Jurado via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 21 Sep 2021 13:39:55 +0200

On Sat, Sep 18, 2021 at 12:45 PM Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Sat, 18 Sep 2021, Isaac Jurado wrote:
>
> > There are two main goals in my case:
> >
> > 1. Minimize the amount of "active" sessions to against a domain
> > 2. Minimize the amount of authentication "dances"
>
> You seem to also want libcurl-applications used in *separate processes*
> using
> shared cookie handling? I think that's the key here.
>

That's right.


> SQLite is not what makes that work, it is having the cookie "engine"
> shared
> between multiple processes. Like a "share object" that works across
> process
> boundaries. Is it not? SQLite just happens to be one technical solution to
> storage and you could achieve the same thing using something else.
>

Correct. The transactional nature of SQLite is just a convenient and
straightforward way to share data with atomic updates across multiple
processes.


> Your focus on replacing the text file fooled me, since that's just how we
> export cookies when closing a handle, and replacing that with something
> SQL
> will not get you the above mentioned features. You don't seem to talk
> about
> changing how cookies are exported when a handle is closed.
>
> Do I understand this correctly?
>

I believe so. Sorry for not being clear. I didn't want to mention SQLite
as a goal, just as a means to an end.

But my use of SQLite did in fact drift me away from the key point. I
thought that the right "generalization" would be to add extension points to
write custom cookie storage. But I never considered making a "share
handle" work across processes, because I didn't think it was a reasonable
goal.

Anyway, I don't want to add anything to your conclusions to prevent further
misunderstandings.

Having said that, I would be very interested on learning your point of view
about this potential feature.

Best regards.

-- 
Isaac Jurado
"The noblest pleasure is the joy of understanding"
Leonardo da Vinci


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2021-09-21