Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

Apache2 / FilterRequestHandler oddity

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


lars at skjaerlund

Dec 6, 2008, 10:44 PM

Post #1 of 2 (457 views)
Permalink
Apache2 / FilterRequestHandler oddity

Hi everyone,

I'm having a rather odd problem that I cannot figure out how to solve:
I've created a mod_perl2 output filter, but my mod_perl2 installation
won't load it - complaining something like

Can't add request filter handler 'Eremita::Test::handler' since it
doesn't have the FilterRequestHandler attribute set

The same code runs fine at other machines.

The machine in question is running openSUSE 11.0 / Apache 2.2.8 /
mod_perl2 2.0.4-dev.

My current test code looks like this:

package Eremita::Test;

use strict;
use warnings FATAL => 'all';

our $VERSION = 0.01;

use base qw(Apache2::Filter);
use Apache2::RequestRec ();
use APR::Table ();

use Apache2::Const -compile => qw(DECLINED HTTP_INTERNAL_SERVER_ERROR OK);
use APR::Const -compile => ':common';

use constant BUFF_LEN => 1024;

sub handler : FilterRequestHandler {
my $f = shift;

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 Apache2::Const::OK;
}

1;

Googling doesn't reveal much - any hints?

Regards,
Lars

--
Lars Skjærlund
Skovengen 111
2980 Kokkedal
Denmark

Tlf.: +45 70258810

http://www.skjaerlund.dk/lars


perrin at elem

Dec 9, 2008, 11:38 AM

Post #2 of 2 (405 views)
Permalink
Re: Apache2 / FilterRequestHandler oddity [In reply to]

On Sun, Dec 7, 2008 at 1:44 AM, Lars Skjærlund <lars [at] skjaerlund> wrote:
> The same code runs fine at other machines.
>
> The machine in question is running openSUSE 11.0 / Apache 2.2.8 / mod_perl2
> 2.0.4-dev.

Are the machines where it runs fine on the exact same versions of
apache and mod_perl? I suspect a different apache.

- Perrin

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.