You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <gy...@laserlink.net> on 2001/05/07 16:06:39 UTC

RE: Apache::Filter upgrade issues...


> -----Original Message-----
> From: Trevor Phillips [mailto:phillips@central.murdoch.edu.au]
> 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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org