Thank you,
I got it.
If I form cookie like this:
my $cookie = $q->cookie( -name=>$cook_name, -value=>$sess_id,
-expires=>$cook_exp);
$self->header_add(-cookie => $cookie);
Everything works honky dory.
But if I form cookie like this:
my $cookie = $q->cookie( -name=>$cook_name, -value=>$sess_id,
-expires=>$cook_exp, -domain=>'.'.$domain, -path=>'/');
It doesn't work at all.
I wonder to know why and how I can set at least domain into cookie.
In the CGI.pm pod I clearly read this:
The interface to HTTP cookies is the cookie() method:
$cookie = cookie(-name=>'sessionID',
-value=>'xyzzy',
-expires=>'+1h',
-path=>'/cgi-bin/database',
-domain=>'.capricorn.org',
-secure=>1);
print header(-cookie=>$cookie);
Then why there is such a discrepancy between my practical case and CGI.pm pod?
Go figure ...
Alex
Alexandr Ciornii wrote:
Hello.
1. Try removing
-domain => '.come_domain.com',
in addition to other changes.
2. Try removing all except '-name', '-value', '-expires' parameters.
and make expires bigger like '+20h'.
2008/5/21 CGI User <[EMAIL PROTECTED]>:
Hi Sasha,
Thanks for the hints.
However, even if I replace '+1H' with '+1h' and don't set secure flag
the cookie still doesn't show up in the browser.
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################