Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

SeaMonkey 2.0.8 Cookie Issues

by Anonymous Monk
on Oct 10, 2010 at 19:46 UTC ( [id://864512]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I had a script that read/printed some cookie values. All was fine until the auto-upgrade to 2.0.8 a week ago. I tried to run it yesterday but I can't get anything to read the cookies (yes, the cookies are present). If I set a new cookie myself, I can read/print it. Otherwise nothing. I've even run the 'get cookie' script from the same folder as the program. As a matter of fact I cannot read/print any cookie except for the newly set cookie. However, it still works in IE

Has anyone had a similar problem with any of the Mozilla browsers?

Replies are listed 'Best First'.
Re: SeaMonkey 2.0.8 Cookie Issues
by Corion (Patriarch) on Oct 10, 2010 at 19:52 UTC

    You don't show any code and don't tell us anything about your setup and the environment, so my advice is somewhat vague. You can help us help you better by posting the relevant parts of the code, preferrably as a self-contained script of a length of about 20 lines.

    Look at what data your script receives. Look at where it differs from what you expect. Use CGI to extract the cookies.

      I reinstalled CGI.pm just in case.

      When I try to get the cookie value for the previously set cookie

      #!/usr/bin/perl use strict; use warnings; use CGI; use lib '/home/user/perl/usr/lib/perl5/site_perl/5.8.8'; my $query = new CGI; print $query->header; print $query->start_html(); my $cookie = $query->cookie('OLD_COOKIE'); print "IT IS: $cookie";

      I get "IT IS:" when I change the cookie name my $cookie = $query->cookie('NEW_COOKIE'); , I get "IT IS: cookie value"

        Maybe the URL changed. Are you sure that the browser is actually sending the old cookie value? Have you checked with a network sniffer?

Re: SeaMonkey 2.0.8 Cookie Issues
by sundialsvc4 (Abbot) on Oct 11, 2010 at 13:23 UTC

    “Auto-upgrade to 2.0.8 of what?”

    Be very methodical in debugging problems like this.   First of all, your comment, “it still works in IE,” almost entirely exonerates Perl as having anything at all to do with this.   (Which is a very helpful thing to know.)

    Your problem-description, of course, is too vague for a stranger from far away to fully understand, but my guess is that the cookies might have been cleared in the (client-side?) upgrade that just happened.   Client-side upgrades probably aren’t supposed to whack the persistent cookie-jar, but I would not count on that.   The pre-upgrade cookie values just might be “gone.”

    However, bottom-line is that you need to see exactly what the Perl-script is seeing.   Client-side debuggers are often the easiest way to do this.   Look at the actual HTTP packet that is being sent.   (Nothing less will do.)   Maybe you can do it on the Perl side, too.   One way to do it would be to capture the two HTTP packets (one for SeaMonkey, the other for IE) and diff them.

    You can waste a lot of time “guessing,” whereas these problems are usually trivial to understand after one good look.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://864512]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-25 13:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found