lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Cookie problems?


From: Leonid Pauzner
Subject: Re: lynx-dev Cookie problems?
Date: Fri, 2 Oct 1998 23:15:40 +0400 (MSD)

>      * From: Rob Partington <address@hidden>

> Using a directory makes the problem of multiple Lynxen accessing the
> cookies slightly simpler.  You have to check for the existence of the
> cookie before you send it (ie stat()) which should automatically pick
> up any new cookies.  Assuming you don't mind a stat() every request,
> which I'm not sure is any great additional load...  It also simplifies
> the question of when to write out the cookie jar - never, it's constantly
> being updated and you never need to do a sync() when you quit lynx.

Probably we may add the code to made multiple lynxes accessing the cookies
in a right way just now, rather easy.  Let we have two aux files
bisides of .lynx-cookies: one to store a single integer (cookies file "version")
and another is a lock file (exists while writing cookies), and lynx remember
the "version" of cookies file it was loading last time. Now every request
for cookies will check the "version" from the disk (so load or not), and
lynx will write the cookies file (and increment the version) every time
it will change the cookie jar contents.

> The only time you have to worry is if Lynx crashes in the middle of
> writing a cookie or the index file.  With a suitably robust format,
> which the IE one appears to be from my quick glances at it, and backups,
> things might never go horribly wrong.  :->

To write cookies every time they are changed probably more safe
than one on exit (we may lost complete session info).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]