Steve wrote:

I'm having some trouble configuring an input filter.. I'm using Apache
2.0.43, mod_perl 1.99_08-dev and perl 5.8.0.

In httpd.conf, I just did this inside a <VirtualHost>

    PerlInputFilterHandler myApache::Filters::filter_in

My code looks something like this:

package myApache::Filters;
#here I loaded different modules etc..
sub filter_in : FilterConnectionHandler{
    my ($filter, $bb, $mode, $block, $readbytes) = @_

    my $rv =$filter->next->get_brigade($bb, $mode, $block, $readbytes);
    return $rv unless $rv = APR::SUCCESS;

    print STDERR "INPUT FILTER\n";
    my $c = $filter->c

    return Apache::OK;
}
Are you sure that this is the code that you run? How about adding a semicolon after $filter->c

In your original post you've asked whether it's OK that the debug warning is printed twice. Yes, that's OK. A filter is called one or more times depending on how other filters output their data. You should get the filter called once per bucket brigade.

This is pretty much just taken from the mod_perl filter documenation, so I'm
pretty sure the code is OK.


My problem is this:

From the time I hit refresh in my browser to the time the content
appears takes a very long time. The request completes eventually, it
just takes forever. As soon as I take the filter handler out of
httpd.conf it works perfectly

Is this a configuration issue? Anyone have any ideas as to why this
happens?
While it responds slowly, do you see the debug printouts coming out slowly as well? Try to use the MyApache::FilterSnoop filter
http://perl.apache.org/docs/2.0/user/handlers/filters.html#All_in_One_Filter
and see where things are delayed.

Also try using a command line useragent: lynx --source, lwp-request, etc. So you will see the output as it comes out.

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to