ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activeperl
activeperl
Re: Apache and mod_perl question
by Michael Gillis other posts by this author
Apr 1 2008 4:21PM messages near this date
Apache and mod_perl question | read date stamp on file
On 29-Mar-08, at 4:45 PM, Zarabozo, Francisco (GE, Corporate) wrote:

>  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.

Hi Francisco,

Isn't that achieved by returning 'Apache2::Const::DECLINED'? You  
mention that you have tried a number of return values in an attempt to  
get this behaviour -- if you've tried this, what's happened instead of  
normal execution?

Incidentally, if you're looking for malicious requests, you may get  
better results if you use a PerlPostReadRequestHandler or  
PerlHeaderParserHandler (depending on whether you need to see pre- or  
post-rewrite requests), or PerlFixupHandler (if you only want to  
handle post-authorization/authentication requests). All 3 of those  
phases are "RUN_ALL" type, rather than "RUN_FIRST" type (which is what  
PerlResponseHandler is), so returning Apache2::Const::OK from a  
handler for those phases only means "I've completed successfully"  
rather than "processing is now done" - but you can still return HTTP  
codes (like Apache2::Const::HTTP_FORBIDDEN) to interrupt the normal  
execution path.

Cheers,
Mike Gillis

_______________________________________________
ActivePerl mailing list
ActivePerl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Francisco Zarabozo
Michael Gillis

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved