Skip Menu |

This queue is for tickets about the MIME-tools CPAN distribution.

Report information
The Basics
Id: 6115
Status: resolved
Priority: 0/
Queue: MIME-tools

People
Owner: dmo+pause [...] dmo.ca
Requestors: jbarrett [...] amduat.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 5.411
Fixed in: (no value)



Subject: MIME::Head recommend_filename doesn't handle whitespace names
When parsing a MIME stream that has no filename set and a name set to " " (that is just whitespace) the recommended_filename return " " as well. This causes the Parser.pm to error when writing the body to the filesystem. write-open /tmp/msg-1082826762-60134-0/ : Is a directory at /usr/local/lib/perl5/site_perl/5.6.1/MIME/Body.pm line 414. The patch included returns undef for any names that include only whitespace. I am not a strong Perl programmer so their is probably a more efficient way to do this.
--- Head.pm.orig Sat Apr 24 10:02:27 2004 +++ Head.pm Sat Apr 24 10:00:55 2004 @@ -771,7 +771,7 @@ ### No? Okay, try to get 'name' from the 'content-type': $value = $self->mime_attr('content-type.name'); - return $value if (defined($value) and $value ne ''); + return $value if (defined($value) and $value ne '' and !($value =~ /^\s+$/)); ### Sorry: undef;
Resolved in upstream; will be fixed in _02 dev release