[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev cookie version weirdness
From: |
brian j pardy |
Subject: |
Re: lynx-dev cookie version weirdness |
Date: |
Sat, 13 Feb 1999 21:59:45 -0800 |
On Sat, Feb 13, 1999, Klaus Weide wrote:
> On Sat, 13 Feb 1999, brian j pardy wrote:
>
[...]
> > So this code in the current dev version (LYCookie.c:279):
> >
> > if (co->version != 0 || !LYAcceptAllCookies) {
> > /*
> > * Apply sanity checks.
> > [all of the sanity checks]
> > }
> >
> > will only be hit if LYAcceptAllCookies is not set. I want to remove
> > the check on LYAcceptAllCookies here and leave it only as:
> >
> > if(co->version != 0) {
> > [do sanity checks]
> > }
>
> No, you don't want to check there for the version at all, I think.
> From what I understood from the list archives, the version check was
> put there together with the LYAcceptAllCookies condition, to limit
> the effect of LYAcceptAllCookies to version 0. I.e. to never skip
> the "sanity checks" for version 1. The way you restructured it, it
> has kind of the opposite effect, always skip the checks for version 0.
Okay. I didn't recall what the original intent was there. Thanks.
> You should get rif of the surrounding "if(co->version ", and either
> make the checking stricter for version >0 in the individual checks,
> or just ignore the version difference.
I'm not quite sure I understand.
By "make the checking stricter", what do you mean? Only apply the
changes I'm doing for version >0 (which doesn't seem to be any
cookies, now)?
Of course, it's probably my fault I don't get it -- I just screwed up
and sent the mail before this to a different mailing list, my hands
are working on autopilot right now...
> > But it seems like every cookie sent there has a version of 0 set, even
> > when the server is sending version 1 (from what I can see in the
> > tracelog). Is this something anyone knows they've changed, or a
> > longstanding bug that just became apparent?
>
> Have you really seen a version 1 cookie in real life, or is this
> a test you made? If you've seen any real ones, I'd be curious to
> see some traces.
>
> AFAIK, version 1 cookies aren't really being used anywhere today, but
> I may be wrong.
I'm not sure.
I was just looking through a tracelog, and it looks like I was looking
at the wrong thing.
HTTP: Sending Cookie2: $Version ="1"
HTTP: Sending Cookie: B=sejslitlfb96d
That's coming from Lynx, not the server. I also saw all of the stuff
in LYProcessSetCookies() that looks like it sets the version to 1
(the several lines like:
if (NumCookies <= max_cookies_domain
&& length <= max_cookies_buffer
&& cur_cookie != NULL && !invalidport) {
if (cur_cookie->version < 1) {
cur_cookie->version = 1;
}
HTList_appendObject(CombinedCookies, cur_cookie);
} else if (cur_cookie != NULL && !invalidport) {
made me think this was something that Just Happened.) But apparently that
code isn't getting hit, for some reason.
So I guess I haven't seen any, then.
--
Writing free verse is like playing tennis with the net down.