lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev Re: persistent cookies - needs changes


From: brian j. pardy
Subject: Re: lynx-dev Re: persistent cookies - needs changes
Date: Wed, 9 Dec 1998 12:56:07 -0800 (PST)

On Wed, 9 Dec 1998, Klaus Weide wrote:

> First, I found something that looks like a definite bug in store_cookie:
> 
>         if (persistent_cookies) {
>             if ((de->bv = FROM_FILE) != 0) {
>                 HTList_appendObject(cookie_list, co);
>             } else {
>                 HTList_insertObjectAt(cookie_list, co, pos);
>             }
>         }
> 
> That should be
> 
>             if (de->bv == FROM_FILE) {
> 
> right?  It was probably written as
> 
>             if (de->bv = FROM_FILE) {
> 
> by mistake, and then someone changed it the wrong way to get rid of a
> compiler warning.
> 
> This may have caused some problems since cookies are effectively
> never ordered by pathlen if persistent_cookies is on.
> 
> It also adds to the problem discussed below.  Once you accept one
> cookie from a new domain, whether it is meant as a persistent cookie
> or not, the FROM_FILE flag is set and further prompts are skipped.
> 
> There seems to be another omission in this section:
> 
> #ifdef EXP_PERSISTENT_COOKIES
>         /* ... */
>         if (persistent_cookies) {
>             if ((de->bv = FROM_FILE) != 0) {
>                 HTList_appendObject(cookie_list, co);
>             } else {
>                 HTList_insertObjectAt(cookie_list, co, pos);
>             }
>         } else        <<<<<
> #else
>         HTList_insertObjectAt(cookie_list, co, pos);
> #endif /* EXP_PERSISTENT_COOKIES */
> 
> The `else' should be added (or the whole thing be rewritten some other way).
> Otherwise cookies are silently dropped if defined(EXP_PERSISTENT_COOKIES)
> but !persistent_cookies.

In looking back over this (I added this section in question), I think it
may not be necessary at all, in fact.  I added this after someone was
having a problem with a site sending many cookies (was it tvgen.com?) that
were not being processed properly.  My thinking then was that the server
was having a problem with the order the cookies were sent in, but now (and
I fixed this slightly later, for a different site) I think the problem is 
that there was code to break lines in the headers when cookies were sent, 
and some sites could not handle this (there's a comment in LYCookie.c at 
line 633). 

It looks like these changes came about in 2.8.1pre.10.

I'm going to look over the archives and see which site this was, and try
it again without this specific section.  I think it will work.

Tomorrow is the beginning of finals, so I may not have time for this 
until next Tuesday.  Either way, it's definitely broken as is.


(Other half of message replied to next...)

-- 
GPG & PGP public keys: <URL:http://www.psnw.com/~posterkid/keys/> 
PGP fingerprint: 42 57 B3 D2 39 8E 74 C3  5E 4D AC 43 25 D2 26 D4

reply via email to

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