You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Trond Arve Nordheim <tr...@nordheim.no> on 2002/01/05 00:39:37 UTC
POST_MAX not working
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."
RE: POST_MAX not working
Posted by Trond Arve Nordheim <tr...@nordheim.no>.
On Sat, 2002-01-05 at 01:03, Jonathan M. Hollin wrote:
> Trond, I've encountered the same with both Apache::Request and CGI.pm.
> Are you on a Windows server???
Nope, using Linux (Debian sid) with Apache 1.3.22 and mod_perl 1.26
w/libapreq 0.33, all three compiled from source...
--
Trond Arve Nordheim
- "This message is ROT13-encrypted twice for extra security."
RE: POST_MAX not working
Posted by "Jonathan M. Hollin" <ne...@digital-word.com>.
:: 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.
Trond, I've encountered the same with both Apache::Request and CGI.pm.
Are you on a Windows server???
Jonathan M. Hollin - WYPUG Co-ordinator
West Yorkshire Perl User Group
http://wypug.pm.org/