perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gokul P. Nair" <gpnai...@yahoo.com>
Subject Re: Apache2::Cookie confusing path and domain
Date Fri, 01 Jul 2005 14:52:49 GMT
also 
printf "Set-Cookie: %s\n", $cookie->as_string;

displays the right values i.e. in my case

Set-Cookie: foo=bar; path=/; expires=Sat, 02-Jul-2005
14:34:42 GMT

Gokul P. Nair


--- "Philip M. Gollucci" <pgollucci@p6m7g8.com> wrote:

> Gokul P. Nair wrote:
> > --- "Philip M. Gollucci" <pgollucci@p6m7g8.com>
> wrote:
> >>Crap I missed the missing name.
> >>
> >>Didn't try expires.  Its probably a bug.
> >>
> >>If you're interested in fixing it, you'll want to
> >>look at
> >>glue/perl/APR/Request/Cookie.xs
> I found the problem but I'm not sure where to
> implement the solution in 
> the apreq-code base yet.
> 
> Given this:
> 
>    my $cookie = APR::Request::Cookie->new($req, name
> => "foo", value => 
> time(), path => '/cookie');
> 
>          print STDERR "$cookie\n";
>          print STDERR Dumper $cookie;
>          print STDERR "name: " . $cookie->name() .
> "\n";
> 
> Prints:
> 1120197880
> $VAR1 = bless( do{\(my $o = 163598384)},
> 'APR::Request::Cookie' );
> name: foo
> 
> 
> the first line should have been
> 
> foo=1120197880; path=/cookie;
> 
> the "as_string()" method being called by ""
> overloading is apparently 
> not the same one as the Apache2::Cookie.  The
> APR::Request::Cookie only 
> returns the value not the full stringification.
> 
> 
> 
> 
> -- 
> END
>
------------------------------------------------------------
>      What doesn't kill us can only make us stronger.
>                  Nothing is impossible.
> 				
> Philip M. Gollucci (pgollucci@p6m7g8.com)
> 301.254.5198
> Consultant / http://p6m7g8.net/Resume/resume.shtml
> Senior Developer / Liquidity Services, Inc.
> 	http://www.liquidityservicesinc.com
> 



		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

Mime
View raw message