From bad4149b187a33249e1648b9fcf344298989cba6 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 26 Jun 2013 13:40:54 +0200 Subject: [PATCH 1/1] Add debugging --- etc/mod_perl/MyApache2/CopyCookie.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etc/mod_perl/MyApache2/CopyCookie.pm b/etc/mod_perl/MyApache2/CopyCookie.pm index 2cdf24f..71c2919 100644 --- a/etc/mod_perl/MyApache2/CopyCookie.pm +++ b/etc/mod_perl/MyApache2/CopyCookie.pm @@ -9,8 +9,12 @@ use Apache2::Const -compile => qw(OK); sub handler { my $f = shift; - my $cookie = $f->r->headers_out->get('Set-Cookie'); - $f->r->headers_out->set('X-Set-Cookie', $cookie); + my $ho = $f->r->headers_out; + my $cookie = $ho->get('Set-Cookie'); + warn "MyApache2::CopyCookie headers_out='$ho', cookie='$cookie'"; + $ho->set('X-Set-Cookie', $cookie); + my $extra = $ho->get('X-Set-Cookie'); + warn "MyApache2::CopyCookie extra cookie='$extra'"; return Apache2::Const::OK; } -- 1.7.10.4