Thanks for the response Malcom. This is what i have:
  my $req = $r->pool();
  my $cookie = APR::Request::Cookie->new
       ($req,
         name => "test",
         value => { product_id => $product_id,
                   qty => $qty },
         path => '/',
         domain => "192.168.1.155",
         expires => '+1d'
       );
   $cookie->expires('+1d'); # i have this line just to
                                be double sure, still
no effect!
   $r->headers_out->add('Set-Cookie'=>$cookie);

After this when i check the cookie set on my bowser
for this domain, the 'name' and 'expires' fields have
not been set! I'm clueless, is $r-headers_out ... the
right way of sending the cookie?

Thanks,

Gokul P. Nair

--- Malcolm J Harwood
<[EMAIL PROTECTED]> wrote:

> On Thursday 23 June 2005 12:29 pm, Gokul P. Nair
> wrote:
> 
> > Also $req needs to be an object of type APR::Pool
> and
> > in the documentation for APR::Pool it is suggested
> > that it is good to use a request pool for these
> short
> > scoped requests. So would $req be created like
> this ?
> > $req = APR::Request::Apache2->handle($r)
> 
> $r should already be your request object (an
> Apache2::RequestRec). In which 
> case, to get a new pool, you just do: $r-pool->new
> 
> > Another question i have is this - I went through
> the
> > code for APR::Request::Cookie and I don't see
> method
> > definitions for most of the methods/subs listed in
> the
> > documentation, even in the base class i.e.
> > APR::Request. Are these methods implemented as
> > functions in C code that is then dynamically
> linked
> > and bootstrapped through the dynaLoader module?
> 
> Yes. The source will probably be in the .xs file for
> the appropriate module.
> 



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

Reply via email to