I am trying to catch the output of a CGI
script and put the body of the generated
HTML page in a template.
Works fine unless the CGI script calls CGI::header.
If the scripts calls CGI::header, two headers
are sent, the first by Apache::Registry/CGI.pm,
the second by my own content handler.
Aparently CGI::header does not send its output
to STDOUT, if it runs under Apache::Registry.
How can I intercept the first header?
Thanks
Martin Holz
===============================================================
if ($r->filename =~ /\.perl$/ ) { # Registry-Skript
tie *SH,'IO::Scalar', \$PAGE;
my $stdout = select SH;
Apache::Registry::handler($r);
select $stdout;
} else {
... Static page
}
Extract body from $page and put it a template