Hi.
I'm trying to limit the size of uploads using Apache::Request. Right
now, I'm using the following code:
my $r = Apache::Request->new($self->{request}, POST_MAX => 1024);
Where $self->{request} is the original Apache::Request-object originally
passed to the handler()-function in my mod_perl loader.
Then, I do as explained in perldoc Apache::Request:
my $status = $r->parse;
if ($status) {
warn "POST too large\n";
}
Just to see if it actually does limit anything. When I then try to post
a 5MB file to this component, no warning is generated in the Apache log.
I've even tried setting POST_MAX to 1 byte, still nothing.
Right now you're probably assuming somethings wrong in my module,
-but-... ;)
When I remove POST_MAX, and instead put DISABLE_UPLOADS => 1, the
warning appears. So it -does- work, just not with POST_MAX.
Any ideas why this is happening?
--
Trond Arve Nordheim
- "This message is ROT13-encrypted twice for extra security."