From: Jonathan S. <jn...@ge...> - 2006-03-28 21:14:00
|
On Tue, 2006-03-28 at 17:16, Cole Bantam wrote: > Hello there, > > If I upload files with tfmail, and the filesize extends the value given in > "CGIPostMax", the "missing fields" Errorpage is presented, instead of an > "Filesize exceeds maximum quota" (or something comparable). > This is actually the correct behaviour as it stands. The CGI perl module, as soon as the POST data exceeds $CGI::POST_MAX (and bear in mind this includes the form fields as well as uploaded files), will stop reading the body data from the http request immediately and doesn't return any parameters, so "missing fields" is exactly what the program sees as none of the 'fields' from the form are present. > Does anyone know how to get a correct "Errorpage", that forces the user to > attach a file that is within the limitation. Currently TFmail doesn't check that this has happened. It can be made to throw an error by adding: if ( $treq->cgi()->cgi_error() =~ /413 POST/i ) { die "Document too large"; } at around line 110 of the TFmail.pl but that is unlikely something we will want to put in a release version and someone will take a look at implementing it with a proper message page. /J\ -- This e-mail is sponsored by http://www.integration-house.com/ |