Have a look at Apache2::Debug filter as it does this.
http://search.cpan.org/~pgollucci/Apache2-DebugFilter-0.02/

I'm aware of this. The problem is, that DebugFilter runs in an
InputFilter hook. That works fine, i.e. a POST body can be read more
than once. But, it does not work in PerlAccessHandler hooks. That's my
problem.

Another thing I tried was this. I've defined PerlAccessFilter
MyModule::foo::bar as:

sub foo {
   my $r = shift;
   my $f = $r->input_filters;

   $f->read(my $buf, 8192);
   $buf;
}

Above pukes with the following:

[Tue Jun 06 16:44:50 2006] [error] [client 192.168.0.12] usage:
$filter->read(buf, [len]) at /test/modules/MyModule/foo.pm line 120.

According to the docs, the above should work. $r->input_filters
returns a Apache2::Filter object. Is this a mod_perl bug?

Reply via email to