Subject: | Blank content-type attributes spew warning |
Content-Type: text/plain;
leads to:
Illegal Content-Type parameter at /usr/local/libdata/perl5/site_perl/Email/MIME.pm line 13
http://www.faqs.org/rfcs/rfc1521.html section 4 suggests these are optional. Here's a patch:
--- ContentType.pm_old Tue Aug 9 15:42:30 2005
+++ ContentType.pm Tue Aug 9 15:43:07 2005
@@ -39,8 +39,10 @@
s/^;//;
s/^\s+// and next;
s/\s+$//;
- s/^([^$tspecials]+)=// or do { carp "Illegal Content-Type parameter $_";
- return $attribs; };
+ s/^([^$tspecials]+)=// or do {
+ carp "Illegal Content-Type parameter $_" if $_;
+ return $attribs;
+ };
my $attribute = lc $1;
my $value = _extract_ct_attribute_value();
$attribs->{$attribute} = $value;