On Mon, Apr 30, 2001 at 03:46:17PM -0400, Ken Y. Clark wrote:
> Here is some code I've used in the past in a mod_perl app to
> set a cookie and do a redirect at the same time.  I believe it
> works for most browsers -- or at least this code has been
> working for over a year and I haven't heard too many complaints
> about this piece (that I can think of).
> 
> my $cookie = Apache::Cookie->new($apr,
>                  -name    => 'foo',
>                  -value   => 'bar',
>                  -expires => '+30m',
>                  -domain  => '.domain.com',
>                  -path    => '/',
>             );
> $cookie->bake;
> 
> $apr->method_number(M_GET);
> $apr->method('GET');
> $apr->headers_in->unset('Content-length');
> $apr->headers_out->add('Location' => '/foo');
> $apr->status(REDIRECT);
> $apr->send_http_header;
> return OK;

i presume $apr is as in "sub handler { my $apr = shift; ... " ?

and is this in PerlAuthhandler?

after seeing the 'expires' dilemma brought about by poorly
configured client system clocks, what advice should we follow?
(what's the Official Party Line on expiring cookies?)

-- 
[EMAIL PROTECTED]

Reply via email to