Hello All,

I might not be in the right mailing list for this question, but I think 
there a lot of people here that might be able to answer it. I apologize in 
advance if I'm wrong.

I'm using Apache 2.2 with mod_perl. I'm trying to write a module to analyze 
certain aspects of each request made to Apache (basically, specific 
malicious requests) and, if some conditions are met, give a special 
response. I'm not having trouble with that part. The problem I have is that 
I can't find the right way to let Apache continue with the normal request if 
the module has nothing to do after the request analysis.

I'm trying something like this:

-----------------------
In httpd.conf:
-----------------------
<Location />
    SetHandler perl-script
    PerlResponseHandler MyRequestAnalyzer
</Location>


------------------------
In MyRequestAnalyzer.pm:
------------------------
package MyRequestAnalyzer;
use strict;
use warnings;
use Apache2::RequestRec ();
use Apache2::RequestIO ();
use Apache2::Const -compile => ':common';

sub handler {
    my $r = shift;
    if ( someConditionsMet($r) ) {
        # Here I give a special response, no problem here.
        return Apache2::Const::OK; # or else for that matter
    } else {
        # Here's my problem.
        # How do I make Apache continue with the normal request?
        # What kind of return value should I send to Apache?
    }
}

1;
-------------------------------

As I said, this is working great when the conditions I expect are met. The 
problem is that when they're not met, the module has nothing else to do and 
I need to let Apache continue with the request just as if it was never 
trapped by this module. I've tried a lot of different return values from 
Apache2 constants, but I can't find one that works yet.

I hope someone can give me some advice to accomplish this. Thank you very 
much in advance.

Cheers,

Paco Zarabozo






_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to