[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev 2.8.1pre.9 cookie reversal fix (possible patch)
From: |
brian j. pardy |
Subject: |
Re: lynx-dev 2.8.1pre.9 cookie reversal fix (possible patch) |
Date: |
Sat, 10 Oct 1998 18:25:07 -0700 |
I wrote:
> This patch seems to fix the problem with Lynx reversing the order of
> cookies loaded from the stored cookies file.
>
> Laura, and anyone else having this problem, could you try this patch out
> and see if it does anything for you?
[snip]
> + if(de->bv = FROM_FILE) {
> + pos = total_cookies;
> + }
> + #endif /* EXP_PERSISTENT_COOKIES */
Oops, my bad. I interpreted total_cookies wrong. It's not total cookies
for this domain, it's just what it says -- total cookies.
Try this patch instead.
diff -cr 2.8.1pre.9/src/LYCookie.c 2.8.1pre.9.bri/src/LYCookie.c
*** 2.8.1pre.9/src/LYCookie.c Mon Sep 28 02:15:11 1998
--- 2.8.1pre.9.bri/src/LYCookie.c Sat Oct 10 18:18:46 1998
***************
*** 501,507 ****
--- 501,522 ----
* 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(de->bv = FROM_FILE) {
+ 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);
--
That woman speaks eight languages and can't say "no" in any of them.
-- Dorothy Parker