From ea5fa54935ecaec961e3744bb26a8de71c94f919 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 26 Jun 2013 14:25:27 +0200 Subject: [PATCH] Copy data --- etc/mod_perl/MyApache2/CopyCookie.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/mod_perl/MyApache2/CopyCookie.pm b/etc/mod_perl/MyApache2/CopyCookie.pm index b0f669f..8961d74 100644 --- a/etc/mod_perl/MyApache2/CopyCookie.pm +++ b/etc/mod_perl/MyApache2/CopyCookie.pm @@ -6,6 +6,8 @@ use APR::Table (); use Apache2::Const -compile => qw(OK); +use constant BUFF_LEN => 1024; + sub handler { my $f = shift; warn "in MyApache2::CopyCookie (f=$f)"; @@ -16,6 +18,12 @@ sub handler { $ho->set('X-Set-Cookie', $cookie); my $extra = $ho->get('X-Set-Cookie'); warn "MyApache2::CopyCookie extra cookie='$extra'"; + + while ($f->read(my $buffer, BUFF_LEN)) { + $f->print($buffer); + } + warn "MyApache2::CopyCookie copied data"; + return Apache2::Const::OK; } -- 1.7.10.4