I was wrong, there is no cookie being set at all.
So, what happens is that the handler gets called
i get an entry in the error_log like
"setting cookie Ticket=ID&1; ... expires=Sun, 15-Jul-2001 ..."
and No Cookie being sent to the browser.
Is it possible to send cookies from the Accesshandler ? or am i wasting my time ?
Should i use push_handlers and use another phase of the request ?
which my modperl doesn't like, i built it with "EVERYTHING=1" but it doesn't want to
call
other handlers than the AccessHandler .. another Puzzle it seems.
Nenad wrote:
> package Apache::PermanentTicketRenewer
use etc. etc.
> my $Counter;
> sub handler {
> my $r = shift;
> $Counter += 1;
> my $cookie = CGI::Cookie->new(-name => 'Ticket',
> -path => '/',
> -domain => '.my.com',
> -expires => '+1M',
> -value => { 'ID' => $Counter }
> );
>
> $r->warn('setting cookie ',$cookie); # this shows up in the error_log
> $r->headers_out->add("Set-Cookie" => $cookie);
> i also tried
> $r->err_header_out("Set-Cookie" => $cookie);
> and
> $r->cgi_header_out("Set-Cookie" => $cookie);
> return OK;
> }
>
> and in httpd.conf
> <Location /my_protected >
> PerlSendHeader On
> PerlAccessHandler Apache::TicketAccess
> #PerlAuthzHandler Apache::TicketAccess
> ...
> </Location>
>
> And it doesn't work !
> The Browser does not set the new cookie , only the first ever sent cookie is set.
> Whats wrong with this ?
> As you can see i also tried to use the AutzHandler, but somehow this does not get
>called at all.
>