perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Quinney <stephen.quin...@computing-services.oxford.ac.uk>
Subject Apache2::Cookie confusing path and domain
Date Wed, 29 Jun 2005 17:56:24 GMT
I'm having a problem with Apache2::Cookie (2.05-dev) and mod_perl2
(1.999.23). No matter what order I specify the parameters in for a new
cookie the path always gets set to the value for the domain. Some
sample code:

 my $cookie = Apache2::Cookie->new($r,
                                    -name   => $username,
                                    -value  => $session,
                                    -secure => 1,
                                    -domain => '.my.domain.com',
                                    -path   => '/foo/');

 $cookie->bake($r);

The cookie set is: 

username=lGb0fQSynbzgAwIh85pNgInP; path=.my.domain.com; domain=.my.domain.com; secure, 

sometimes instead of this I get:

username=HpoX0huDHnTM8JaEsmZNGIJS; path=domain; domain=.my.domain.com; secure,

Which is even weirder.

Any help as to what I'm doing wrong or workarounds if this is a bug
would be appreciated.

Thanks in advance,

Stephen Quinney


Mime
View raw message