Thanks for the reply. I know it is possible to do it inside the handler. However, for performance reasons, we want to prevent the handler from running on every request by configuring Apache. Thanks again Woinshet
----- Original Message ---- From: Torsten Foertsch <[EMAIL PROTECTED]> To: modperl@perl.apache.org Cc: woinshet abdella <[EMAIL PROTECTED]> Sent: Friday, March 28, 2008 10:10:20 AM Subject: Re: Invoking an OutputFilterHandler for a particular User-Agent 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 ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs