> -----Original Message-----
> From: Trevor Phillips [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, May 05, 2001 2:21 AM
> To: ModPerl Mail List
> Subject: 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?

well, part of the problem is that Apache->request($r) doesn't bless a new
request properly.

I know that Ken has recently tried working on the problem and had placed it
on Doug's radar:
http://marc.theaimsgroup.com/?t=98600804000001&w=2&r=1
(ping :)

at any rate, it probably won't work, but maybe try switching the order
around?  That is, maybe call Apache::Request->new on the request object
returned by filter_register?

HTH

--Geoff


Reply via email to