Get rid of tmp file.
[mkws-moved-to-github.git] / etc / mod_perl / MyApache2 / CopyCookie.pm
1 package MyApache2::CopyCookie;
2
3 use Apache2::Filter ();
4 use Apache2::RequestRec ();
5 use APR::Table ();
6
7 use Apache2::Const -compile => qw(OK);
8
9 sub handler {
10     my $f = shift;
11     warn "in MyApache2::CopyCookie (f=$f)";
12
13     my $ho = $f->r->headers_out;
14     my $cookie = $ho->get('Set-Cookie');
15     warn "MyApache2::CopyCookie headers_out='$ho', cookie='$cookie'";
16     $ho->set('X-Set-Cookie', $cookie);
17     my $extra = $ho->get('X-Set-Cookie');
18     warn "MyApache2::CopyCookie extra cookie='$extra'";
19     return Apache2::Const::OK;
20 }
21
22 1;