On Sun, 2005-01-30 at 21:54 +0000, Alex Greg wrote:
> The problem I have found is that when I modify print_content_type as follows:
>
> sub print_content_type
> {
> my ($content_type) = @_;
>
> my $r = Apache->request();
>
> $r = $r->filter_register;
> $fh = $r->filter_input();
>
> if (!$content_type)
> {
> $r->send_http_header("text/html");
> }
> else
> {
> $r->send_http_header($content_type);
> }
> }
>
> in order to register our application with the Apache::RegistryFilter
> chain (which is required to use either Apache::Dynagzip or
> Apache::Compress), I get the following in the error log:
>
> [Sat Dec 25 01:36:32 2004] [error] Not a HASH reference at
> /usr/lib/perl5/site_perl/5.8.3/Apache/Filter.pm line 197.
Have you tried using Apache::RegistryFilter instead of Registry? Or
try putting something like this at the top of your scripts:
my $r = shift;
$r->filter_register();
I don't think there's any reason for you to call $r->filter_input().
- Perrin