perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Lambrichs <marc.lambri...@melange-it.nl>
Subject reset multiple cookies
Date Sat, 09 Dec 2006 01:18:09 GMT
I'm trying to reset multiple cookies. However, only the last one of the 
@cookies array is reset. How come?

        foreach ( @domains ){
            push @cookies, APR::Request::Cookie->new( $r->pool,
                                                    name => 'ticket',
                                                    value => '',
                                                    path  => '/',
                                                    ( domain => $_ ),
                                                    @expires );
        }
        foreach my $cookie ( @cookies ){
            $log->debug( '[logout]: ' . $cookie->as_string );
            $r->err_headers_out->add( 'Set-Cookie' => $cookie->as_string );
        }
        return Apache2::Const::OK;

Cheers,
Marc

Marc Lambrichs
====================================
Melange IT B.V.
Postbus 3581
1001 AJ Amsterdam
http://www.melange-it.com
====================================



Mime
View raw message