From: Don Armstrong Date: Wed, 23 Sep 2015 16:17:15 +0000 (-0700) Subject: also use a filesystem in handle_email_message to avoid running out of memory X-Git-Tag: release/2.6.0~221 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d36378ccdad74171fab90161276d5837b4dda874;p=debbugs.git also use a filesystem in handle_email_message to avoid running out of memory --- diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm index f080986a..64211884 100644 --- a/Debbugs/CGI/Bugreport.pm +++ b/Debbugs/CGI/Bugreport.pm @@ -322,8 +322,9 @@ sub handle_email_message{ my $parser = MIME::Parser->new(); # Because we are using memory, not tempfiles, there's no need to # clean up here like in Debbugs::MIME - $parser->tmp_to_core(1); - $parser->output_to_core(1); + # this will be cleaned up once it goes out of scope + my $tempdir = File::Temp->newdir(); + $parser->output_under($tempdir->dirname()); $entity = $parser->parse_data( $email); } else { $entity = $email