> $r->err_headers_out->add('Set-Cookie' =>
> sprintf("%s", 
> $cookie->as_string));

or the code below would suffice too.

$r->headers_out->add('Set-Cookie'=>$cookie->as_string);

Gokul P. Nair

--- "Philip M. Gollucci" <[EMAIL PROTECTED]> wrote:

> Gokul P. Nair wrote:
> 
> >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
> >  
> >
> I agree.
> 
> http://p6m7g8.net/cookie is update to the below:
> Seems to work for me.
> 
> sub handler () {
> 
>         my $r = shift;
>         my $req = $r->pool();
> 
>         my $cookie = APR::Request::Cookie->new($req,
> name => "foo", 
> value => time(), path => '/cookie');
> 
>         $r->err_headers_out->add('Set-Cookie' =>
> sprintf("%s", 
> $cookie->as_string));
> 
>         $r->print("Content-Type: text/plain\n\n");
>         $r->print("Testing....");
>         printf "Set-Cookie: %s\n",
> $cookie->as_string;
> 
>         return Apache2::Const::OK;
> }
> 
> 
> -- 
> END 
>
---------------------------------------------------------
>     What doesn't kill us can only make us stronger.
>                Nothing is impossible.
>                               
> Philip M. Gollucci ([EMAIL PROTECTED])
> 301.254.5198
> Consultant / http://p6m7g8.net/Resume/resume.shtml
> Senior Developer / Liquidity Services, Inc.
>      http://www.liquidityservicesinc.com
>         http://www.liquidation.com
>         http://www.uksurplus.com
>         http://www.govliquidation.com
>         http://www.gowholesale.com
> 
> 
> 



                
__________________________________ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html

Reply via email to