if (($POST_MAX > 0) && ($content_length > $POST_MAX)) {
$self->cgi_error("413 Request entity too large");
last METHOD;
sub cgi_error {
my ( $self, $err ) = @_;
if ( $err ) {
$self->{'.cgi_error'} = $err;
$self->{'.globals'}->{'FATAL'} == 1 ? croak $err :
$self->{'.globals'}->{'FATAL'} == 0 ? carp $err : return
+$err;
}
return $self->{'.cgi_error'};
}
What this achieves is to set the cgi_error() method which behaves depending on $CGI::FATAL. A 413 header is not generated. All that generally happens is that CGI.pm exits its multipart parsing loop (METHOD:) and proceeds happily along (unless it croaked in cgi_error). As it has not got any data it end up doing zip. With no params the general behaviour written into most CGIs is to display the default/login page....
All that is required is to check for this error and do whatever....
my $q = new CGI;
do_file_too_big() if $q->cgi_error =~ m/413/;
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|