Hi, Michele,
Show quoted text> When parsing a mail containing a completely empty MIME part (just the
> repetition of two boundaries) MIME::Parser returns an entity. When
> calling the method mime_type on such entity I get as a result the
> string "text/plain; charset=us-ascii" instead of the
> expected "text/plain".
Thanks for your bug report. We've fixed it in our repository.
A patch is included below for your convenience.
Regards,
David.
diff --git a/lib/MIME/Parser.pm b/lib/MIME/Parser.pm
index f691d6b..a0ff765 100644
--- a/lib/MIME/Parser.pm
+++ b/lib/MIME/Parser.pm
@@ -1051,7 +1051,7 @@ sub process_part {
if (not defined $head) {
$self->debug("bogus empty part");
$head = $self->interface('HEAD_CLASS')->new;
- $head->mime_type('text/plain; charset=US-ASCII');
+ $head->mime_type('text/plain');
$ent->head($head);
$ent->bodyhandle($self->new_body_for($head));
$ent->bodyhandle->open("w")->close or die "$ME: can't close: $!";