You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Trevor Phillips <ph...@central.murdoch.edu.au> on 2001/05/05 08:20:46 UTC

Apache::Filter upgrade issues...

Hi! I recently upgraded a test server to a recent Apache::Filter, and hit
problems due to the new dependency on filter_register() being called. I
don't mind upgrading my filters to call this, but I have one, in which I
use Apache::Request (a sub-class of Apache), which I cannot seem to work
around.

The guts of the code goes something like this:

sub handler
{
   my $r = shift;
   my $IsFilter = ($r->dir_config('Filter') =~ /^on/i?1:0);
   $r = Apache::Request->new($r);
   if ($IsFilter)
   {
      $r = $r->filter_register();
      my ($fh, $status) = $r->filter_input();
      return $status unless $status == OK;  # The Apache::Constants OK
      my @file = <$fh>;
   }
etc...
}

The above code fails in that the extra methods provided by Apache::Request
are
no longer there.

The above code worked fine previously (prior to the requirement of
filter_register)...

Any ideas? How can I use both Apache::Filter and Apache::Request together?

--
. Trevor Phillips             -           http://jurai.murdoch.edu.au/ . 
: CWIS Systems Administrator     -           T.Phillips@murdoch.edu.au : 
| IT Services                       -               Murdoch University | 
 >------------------- Member of the #SAS# & #CFC# --------------------<
| On nights such as this, evil deeds are done. And good deeds, of     /
| course. But mostly evil, on the whole.                             /
 \      -- (Terry Pratchett, Wyrd Sisters)                          /