[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: |
Sat, 12 Dec 1998 19:50:18 -0800 |
On Wed, Dec 09, 1998, I wrote:
> 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);
> > }
> > }
> > [...]
> > 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).
Okay, after going through the code again, and trying this out on
www.tvgen.com, it looks like this code was indeed unnecessary after the
fix for wrapped Cookie: headers went in.
Here's the removal as a patch (against dev.8):
diff -cr 2.8.2dev.8/src/LYCookie.c 2.8.2dev.8.bri/src/LYCookie.c
*** 2.8.2dev.8/src/LYCookie.c Thu Dec 3 10:28:20 1998
--- 2.8.2dev.8.bri/src/LYCookie.c Sat Dec 12 19:42:14 1998
***************
*** 507,530 ****
* if confirmed or 'allow' is set to always. - FM
*/
} else if (HTConfirmCookie(de, hostname, co->name, co->value)) {
-
- #ifdef EXP_PERSISTENT_COOKIES
- /*
- * If the cookie domain came from persistent cookie file,
- * we want to add new cookies to the end of the cookie list
- * to maintain their order for servers that need cookies in
- * a particular order. This is a hack.
- */
- if (persistent_cookies) {
- if ((de->bv = FROM_FILE) != 0) {
- HTList_appendObject(cookie_list, co);
- } else {
- HTList_insertObjectAt(cookie_list, co, pos);
- }
- }
- #else
HTList_insertObjectAt(cookie_list, co, pos);
- #endif /* EXP_PERSISTENT_COOKIES */
total_cookies++;
} else {
freeCookie(co);
--- 507,513 ----
--
Make it myself? But I'm a physical organic chemist!