SPUG: CGI::Cookies question

Peter Darley pdarley at serviceintelligence.com
Thu Feb 17 12:05:10 CST 2000


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





More information about the spug-list mailing list