Hi, am I too stupid or does anybody see the problem with the code above doesn't push an output-filter? When uncommenting PerlOutputFilterHandler line the filter is invoked but I cannot push them dynamically. Why?
-----------------8<----------------- <Files *\.xml > PerlSetVar AxDebugLevel 9 PerlFixupHandler Beso::PushOutFilterHandler #PerlOutputFilterHandler Beso::OutFilterHandler PerlSetVar AxDebugLevel 10 </Files> -----------------8<----------------- -----------------8<----------------- package Beso::PushOutFilterHandler; use Apache::RequestRec; use Apache::Const qw(:common); use Beso::OutFilterHandler; sub handler { my $r = shift; $r->push_handlers( PerlOutputFilterHandler => \&Beso::OutFilterHandler::handler ); return Apache::OK; } 1; -----------------8<----------------- -----------------8<----------------- package Beso::OutFilterHandler; use strict; use warnings; use Apache::Filter (); use Apache::RequestRec (); use APR::Table (); use Apache::Const -compile => qw(OK); use constant BUFF_LEN => 1024; sub handler { my $f = shift; print STDERR "Filter is invoked\n"; unless ($f->ctx) { $f->r->headers_out->unset('Content-Length'); $f->ctx(1); } while ($f->read(my $buffer, BUFF_LEN)) { $buffer =~ s/[\r\n]//g; $f->print($buffer); } return Apache::OK; } 1; -----------------8<----------------- -- "Happy ProMail" bis 24. März: http://www.gmx.net/de/go/promail Zum 6. Geburtstag gibt's GMX ProMail jetzt 66 Tage kostenlos!