From: Mike Taylor Date: Wed, 26 Jun 2013 12:25:27 +0000 (+0200) Subject: Copy data X-Git-Tag: 0.9.1~494 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=ea5fa54935ecaec961e3744bb26a8de71c94f919;p=mkws-moved-to-github.git Copy data --- 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; }