From: Christian Hansen Date: Wed, 30 Mar 2005 23:33:30 +0000 (+0000) Subject: fix C::E::Apache cookie issue X-Git-Tag: 5.7099_04~1645 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=4612bc16fae23b7ee932e184db21f0d975981d86 fix C::E::Apache cookie issue --- diff --git a/lib/Catalyst/Engine/Apache.pm b/lib/Catalyst/Engine/Apache.pm index 5f8db71..f6c0b5f 100644 --- a/lib/Catalyst/Engine/Apache.pm +++ b/lib/Catalyst/Engine/Apache.pm @@ -70,12 +70,12 @@ sub finalize_headers { $name => $c->response->headers->header($name) ); } while ( my ( $name, $cookie ) = each %{ $c->response->cookies } ) { - my %cookie = ( -name => $name, -value => $cookie->{value} ); - $cookie->{-expires} = $cookie->{expires} if $cookie->{expires}; - $cookie->{-domain} = $cookie->{domain} if $cookie->{domain}; - $cookie->{-path} = $cookie->{path} if $cookie->{path}; - $cookie->{-secure} = $cookie->{secure} if $cookie->{secure}; - my $cookie = Apache::Cookie->new( $c->original_request, %cookie ); + my %crunchy = ( -name => $name, -value => $cookie->{value} ); + $crunchy{-expires} = $cookie->{expires} if $cookie->{expires}; + $crunchy{-domain} = $cookie->{domain} if $cookie->{domain}; + $crunchy{-path} = $cookie->{path} if $cookie->{path}; + $crunchy{-secure} = $cookie->{secure} if $cookie->{secure}; + my $cookie = Apache::Cookie->new( $c->original_request, %crunchy ); MP2 ? $c->apache_request->err_headers_out->add( 'Set-Cookie' => $cookie->as_string )