$CGI::POST_MAX
If set to a non-negative integer, this variable puts a
ceiling on the size of POSTings
...
An attempt to send a POST larger than $POST_MAX bytes
will cause param() to return an empty CGI parameter list.
You can test for this event by checking cgi_error(),
####
METHOD: {
# avoid unreasonably large postings
if (($POST_MAX > 0) && ($content_length > $POST_MAX)) {
# quietly read and discard the post
my $buffer;
my $max = $content_length;
while ($max > 0 &&
(my $bytes = $MOD_PERL
? $self->r->read($buffer,$max < 10000 ?
$max : 10000)
: read(STDIN,$buffer,$max < 10000 ? $max : 10000)
)) {
$self->cgi_error("413 Request entity too large");
last METHOD;
}
}
##
##
if (($POST_MAX > -1 ) && ($content_length > $POST_MAX))