SPUG: CGI::Cookies question
Peter Darley
pdarley at serviceintelligence.com
Fri Mar 3 09:52:14 CST 2000
Friends,
The problem was apperantly that the clock on the machine was set wrong and
it was sending out cookies that were already expired. I don't know why
Netscape was returning these expired cookies; maby it assumed that any
cookie with an invalid expiration time should never expire. Anyway, that's
what the problem was.
Thanks,
Peter D.
> -----Original Message-----
> From: owner-spug-list at pm.org [mailto:owner-spug-list at pm.org]On Behalf Of
> David Waring
> Sent: Wednesday, March 01, 2000 8:03 PM
> To: pdarley at serviceintelligence.com
> Cc: spug-list at pm.org
> Subject: Re: SPUG: CGI::Cookies question
>
>
> I had a problem like this with IE last year. Seems to be a bug in IE.
> Turns out if you set a cookie with no value, IE (at least v4 and v5
> on NT) will not accept any other cookies from that domain. If I
> remember correctly it behaved as if it was accepting the cookie but
> it really didn't. Perhaps this is the problem.
>
> David Waring
>
>
> >Friends,
> > I guess I'll take advantage of this slow period on the list
> to ask my
> >stupid question. The problem I'm having is that I have a problem with IE
> >accepting my cookies. My code is thus:
> >
> >----------------------------------------------------------------
> >use CGI qw/:standard/;
> >use CGI::Cookie;
> >
> >print SetStandardCookies($UserName, $Password);
> >
> >s*b SetStandardCookies
> > {
> > my ($UserName, $Password) = @_;
> >
> > my ($UserNameCookie, $PasswordCookie);
> >
> > $UserNameCookie = new CGI::Cookie(-name => 'UserName',
> > -value => $UserName,
> > -domain => 'cdarley.dyndns.org',
> > -path => '/games/',
> > -expires => "+1h");
> >
> > $PasswordCookie = new CGI::Cookie(-name => 'Password',
> > -value => $Password,
> > -domain => 'cdarley.dyndns.org',
> > -path => '/games/',
> > -expires => "+1h");
> > return header(-cookie=>[$UserNameCookie, $PasswordCookie]);
> > };
> >----------------------------------------------------------------
> >
> > It sets the cookie on Netscape, and used to set the cookie on
> >IE browsers
> >when my application was being served from a Win98 machine, but
> now that I've
> >ported it to Apache mod_perl under Linux, IE doesn't end up with any
> >cookies. Anybody have any experience with this kind of thig, or is there
> >some obvouse error in my code?
> >
> > Thanks for your help!
> >
> >Peter Darley
> >
> >
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - -
> > POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
> > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
> > SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
> > Email to majordomo at pm.org: ACTION spug-list your_address
>
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
> Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
> SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
> Email to majordomo at pm.org: ACTION spug-list your_address
>
>
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
Email to majordomo at pm.org: ACTION spug-list your_address
More information about the spug-list
mailing list