> I have written a perl script which prevents browsers (or evil exploits) to 
> send buffer owerflows to apache. Basicaly this script is supposed to listen 
> on port 80 for incoming connections. The input (from browsers) is read up to 
> 500 characters.

don't the apache directives:

   LimitRequestBody
   LimitRequestFields
   LimitRequestFieldsize
   LimitRequestLine

essentially do what you are coding yourself?

> Some friend of mine told me that apache perl modules should be faster so 
> here's my question. How do I limit the webclient's input to a number of 
> characters, bytes whatever...

my the time mod_perl enters the request, Apache has already taken care 
of parsing the request, so there's not much you can do about it (in 
1.3, at least).

if you use Apache::Request (part of libapreq) you can limit the 
message body (POSTed content) via some directives and throw out an 
informative message.  or you can use mod_perl's native read() method 
to read only so much data from the client.

there are lots things to learn in mod_perl, and there is lots of 
online material and books to help. 
http://perl.apache.org/help/index.html is a good place to start.

--Geoff



Reply via email to