lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev Cookie problems? (another patch + info)


From: brian j. pardy
Subject: Re: lynx-dev Cookie problems? (another patch + info)
Date: Fri, 25 Sep 1998 21:58:34 -0700

I wrote:
> Larry W. Virden wrote:
> > > When I try to access http://www.medscape.com/ with its cookie saved, Lynx
> > > says "Alert!: HTTP/1.1 400 Bad Request". When I delete the cookie I can
> > > access the site and login manually.
> > 
> > Is it safe to assume that 2.8.1 formal will remain on hold until this
> > situation is resolved?
> 
> I think this fixes part or all of the problem.
> 
> Laura, could you try this on shopping.com, and Heikki on IMDB? 

Okay, that patch fixed the problem that was causing the 400 Bad Request, I
believe.

This next patch here should halfway fix one of Heikki's problems with
IMDB. This will take care of the server not accepting your cookies when
you had ".imdb.com" in COOKIE_ACCEPT_DOMAINS.

I missed a line in cookie_add{accept,reject}list() that was causing this
problem where cookies would be deleted from memory if a persistent cookie
had the same domain as an entry in COOKIE_{ACCEPT,REJECT}_DOMAINS.

It looks there's another problem, though.


Say I have three cookies in ~/.lynx_cookies:

cookie1 foo.com bar baz 
cookie2 .imdb.com bar baz 
cookie3 .imdb.com bar baz 

I start Lynx, and hit imdb.com. Lynx sends these cookies to the server,
and everything works perfectly. The page displays my nick/address
properly, without the 'Unknown/Unknown'.

Now, I exit Lynx, saving these cookies. The cookies are rewritten to
~/.lynx_cookies in reverse order:

cookie3 .imdb.com bar baz 
cookie2 .imdb.com bar baz 
cookie1 foo.com bar baz 

Now, next time I go to imdb.com, Lynx sends the cookies to the server, but
in the reverse order than the server expects them. I'm not sure why the
server cares, but that seems to be a problem there.

I don't see any reason why it should matter to the server, but I suppose
we should also fix the "write-cookies-in-reverse-order" bit. I'll start
taking a look at that as well.

FWIW, quitting and restarting Lynx will get the cookies back into the
original order, and work properly. Not that that's a fix, but...

This patch, combined with the other two I've posted today (to move cookie
saving to quit-time, and to fix the extra newline bug in LYLoadCookies)
should fix up a lot of the problems people may be having.


diff -cr 2.8.1pre.2/src/LYCookie.c 2.8.1pre.2.bri/src/LYCookie.c
*** 2.8.1pre.2/src/LYCookie.c   Fri Sep 25 21:47:56 1998
--- 2.8.1pre.2.bri/src/LYCookie.c       Fri Sep 25 21:31:35 1998
***************
*** 2511,2516 ****
--- 2511,2517 ----
            de->bv = ACCEPT_ALWAYS;
  
            StrAllocCopy(de->domain, strsmall);
+             de->cookie_list = HTList_new();
            HTList_addObject(domain_list, de);
        } else {
            de2->bv = ACCEPT_ALWAYS;
***************
*** 2582,2587 ****
--- 2583,2589 ----
            de->bv = REJECT_ALWAYS;
  
            StrAllocCopy(de->domain, strsmall);
+             de->cookie_list = HTList_new();
            HTList_addObject(domain_list, de);
        } else {
            de2->bv = REJECT_ALWAYS;


-- 
"a handful of LEAFLETS would be better than MS' 'personal web server'" -E.
For the next hour, WE will control all that you see and hear.

reply via email to

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