On Wed, 29 Mar 2000, brian j pardy wrote:
> On Wed, Mar 29, 2000, Klaus Weide wrote:
> > 4) Cookies are still not saved to the COOKIE_FILE (or rather,
> > COOKIE_SAVE_FILE) with -source.[*]  Which makes the addition
> > of the COOKIE_SAVE_FILE option rather pointless.
> > brian j pardy <[EMAIL PROTECTED]> was working on it before
> > Christmas, but it never got finished.
> 
> I was never able to trace things back far enough to figure out the
> best way to do it.  I think what I had done before would be enough to
> save cookies in "most cases", but it looks like a case of the last 10%
> of the work taking forever, to me.  I have no idea where to go from
> here -- I don't know the rest of the internals well enough.

Well, if the best way is too complicated (and it seems so, at least
it would take time for testing), we can still use the "easy way out"
way.  Accept that HTFWriter_free does exit_immediately(0); but
explicitly call LYStoreCookies() right before that.
Probably with the same #ifdef/if() tests as in LYMain.c, i.e.
code near end of HTFWriter_free should look like this:


    if (dump_output_immediately) {
        if (me->anchor->FileCache)
            remove(me->anchor->FileCache);
        FREE(me);
#ifdef EXP_PERSISTENT_COOKIES
        /*
         *  We want to save cookies picked up when in source
         *  mode.  ...
         */
        if (persistent_cookies)
            LYStoreCookies(LYCookieSaveFile);
#endif /* EXP_PERSISTENT_COOKIES */
        exit_immediately(0);
   }

I don't anticipate any problems (wasn't this your first approach?),
I still dislike the exit_immediately(0) drom deep inside the
stream, but cookie saving with -source should work.

Otherwise we'd release lynx with new COOKIE_SAVE_FILE option that
some people would have to change their lynx.cfg to, only to discover
that it still doesn't act as promised.

   Klaus


Reply via email to