Problem with CGI.pm POST_MAX
From: Bryan (bryan_at_akanta.com)
Date: 03/31/04
- Previous message: Uri Guttman: "Re: Question Regarding LWP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Mar 2004 00:56:33 GMT
I have a script that uses the following code:
$CGI::POST_MAX = 1024 * 100; # Set 100K limit on uploads
my $file = param("upload");
## Trap exceeded file size error from CGI::POST_MAX
if (!$file && cgi_error()) {
print header();
print "<script language=JavaScript type=text/javascript>\n";
print "history.back(1);";
print "alert(\'File size exceeded- There is currently a 100kb max per
upload file\');";
print "</script>";
}
I have used this before and it worked fine. Now, with a newer version
of CGI.pm (> 3.0) this functionality no longer works at all. When
trying to upload a too-large file, the server (apache) just hangs until
it times out. It never seems to either catch the cgi_error(), or
perhaps the error is no longer thrown.
Anyone have any ideas what to do?
Thanks,
Bryan
- Previous message: Uri Guttman: "Re: Question Regarding LWP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|