Do all processing in-core.

This commit is contained in:
hjp 2000-02-08 17:06:19 +00:00
parent 4f9255c36f
commit a71bee15a1
1 changed files with 2 additions and 2 deletions

View File

@ -39,8 +39,7 @@ sub dump_entity {
# Get MIME type, and display accordingly...
my ($type, $subtype) = split('/', $entity->head->mime_type);
my $body = $entity->bodyhandle;
my $path = $body->path;
my $size = ($path ? (-s $path) : '???');
my $size = length($body->as_string);
print ' ' x $level, "Content-type: $type/$subtype ($size bytes)\n";
}
1;
@ -59,6 +58,7 @@ sub main {
(-d ".mimedump-tmp") or mkdir ".mimedump-tmp",0700 or die "mkdir: $!";
(-w ".mimedump-tmp") or die "can't write to directory";
$parser->output_dir(".mimedump-tmp");
$parser->output_to_core(ALL);
# Read the MIME message:
$entity = $parser->read(\*STDIN) or die "couldn't parse MIME stream";