On Mon, 31 Jan 2005 15:34:05 -0500, Perrin Harkins <[EMAIL PROTECTED]> wrote:
> 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?HI Perrin, I'm using Apache::RegistryFilter: PerlHandler Apache::RegistryFilter Apache::Dynagzip See the attached httpd.conf for full context etc. > 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(). This causes the same problem as: $r = Apache->request(); Attached is my httpd.conf and a script test.cgi which reproduces the problem I'm having. I'm using Apache/1.3.33 with mod_perl statically linked. Regards, -- Alex
httpd.conf
Description: Binary data
test.cgi
Description: Binary data
