lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev Re: Cookie trace messages


From: Leonid Pauzner
Subject: Re: lynx-dev Re: Cookie trace messages
Date: Mon, 14 Dec 1998 23:18:23 +0300 (MSK)

>> > Probably the cookie trace messages should be more human-friendly
>> > to decrease confusion: `loading from file on start-up',
>> > `checking before HTTP request', `storing into the file on exit'.

> It's very easy.  If anyone wants to take a look at it and come up with
> something that looks better (my aesthetic taste is "challenged", you could
> say) I'd be happy with it.

> I tried to clean up a little bit with my last patch -- some things were
> being printed and not labeled as cookies.  It seems my opinion of 'clean'
> isn't shared. :)

I make some cleanup (below), but while inspecting a trace I was surprized
enough: I have a persistent cookie which signed as expired in 1970
but dev.9  load/store it nicely every session (should delete, right?).

LYLoadCookies: tokenising welcome.to    FALSE   /       FALSE   0       
ASPSESSIONIDGQQGQQYP    HFPIOLOBMKECCJMDICIMIPIP
        0:0x8110d9c:0xbfffe6cc:[welcome.to]
        1:0x81120a0:0xbfffe6d7:[FALSE]
        2:0x8110e9c:0xbfffe6dd:[/]
        3:0x81120a8:0xbfffe6df:[FALSE]
        4:0x81120b0:0xbfffe6e5:[0]
        5:0x8110f9c:0xbfffe6e7:[ASPSESSIONIDGQQGQQYP]
        6:0x811109c:0xbfffe6fc:[HFPIOLOBMKECCJMDICIMIPIP]
expires:        Thu Jan  1 03:00:00 1970
                         ^^^^^^^^^^^^^^^

Also a hex address a little bit criptic to write it out for trace, no?


* Cookie trace messages corrected slightly - LP

diff -u old/lycookie.c ./lycookie.c
--- old/lycookie.c      Sat Dec 12 20:10:36 1998
+++ ./lycookie.c        Mon Dec 14 22:59:02 1998
@@ -532,17 +532,21 @@
     int len = 0;
     char crlftab[8];

+    CTRACE(tfp, "LYCookie.c: scan_cookie_sublist for host=%s, path=%s\n",
+                                                  hostname, path);
+
     sprintf(crlftab, "%c%c%c", CR, LF, '\t');
     while (hl) {
        co = (cookie *)hl->object;
        next = hl->next;

-       if (co) {
+       if ((co) && host_matches(hostname, co->domain)) {
+
            CTRACE(tfp, "Checking cookie %lx %s=%s\n",
                            (long)hl,
                            (co->name ? co->name : "(no name)"),
                            (co->value ? co->value : "(no value)"));
-           CTRACE(tfp, "%s %s %d %s %s %d%s\n",
+           CTRACE(tfp, "\t%s %s %d %s %s %d%s\n",
                            hostname,
                            (co->domain ? co->domain : "(no domain)"),
                            host_matches(hostname, co->domain),
@@ -1990,6 +1994,8 @@
        /* No cookies, so don't bother updating the file */
        return;
     }
+
+    CTRACE(tfp, "LYStoreCookies: save cookies to %s on exit\n", cookie_file);

     cookie_handle = LYNewTxtFile (cookie_file);
     for (dl = domain_list; dl != NULL; dl = dl->next) {
@@ -2028,7 +2034,7 @@
            if ((co = (cookie *)cl->object) == NULL)
                continue;

-           CTRACE(tfp, "LYStoreCookies: %ld cf %ld\n", (long) now, (long) 
co->expires);
+       /*    CTRACE(tfp, "LYStoreCookies: %ld cf %ld\n", (long) now, (long) 
co->expires); */
            fprintf(cookie_handle, "%s\t%s\t%s\t%s\t%ld\t%s\t%s\n",
                de->domain,
                "FALSE", co->path,




reply via email to

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