On Fri 28 Mar 2008, woinshet abdella wrote:
> PerlRequire /usr/local/libexec/perl/startup.pl
> PerlModule Apache::CustomFilterTitle
> <Files ~ "*\.html">
>        PerlOutputFilterHandler Apache::CustomFilterTitle
> </Files>
> ...
> This is working as expected.
> My question is, I need to find a way to invoke the handler ONLY for a
> particular user-agent.

use something like the following lines at start of your filter:

unless( $f->ctx ) {
  unless( $f->r->headers_in->{'User-Agent'} eq 'Wanted' ) {
    $f->remove;
    return Apache2::Const::DECLINED;
  }
}

Torsten

Reply via email to