*
https://launchpad.net/~maxb via RT (bug-Mail-Box@rt.cpan.org) [131104 12:09]:
Show quoted text> Mon Nov 04 07:09:05 2013: Request 90035 was acted upon.
> Transaction: Ticket created by
https://launchpad.net/~maxb
> Queue: Mail-Box
> Subject: Tolerate extra whitespace in header parameters
> Broken in: 2.105
>
> There seems to be a fair amount of email out there with MIME
> Content-Type headers containing extra whitespace around the =-sign
> of parameters:
>
> Content-Type: text/plain; charset = "utf-8"
I do not know whether it is allowed according to the RFCs, but it
seems sensible. This should work:
in lib/Mail/Message/Field/Attribute.pm:
- my $name = ($attr =~ m/^(.*?)(?:\*\d+)?\*?\=/ ? $1 : $attr);
+ my $name = ($attr =~ m/^(.*?)(?:\*\d+)?\*?\s*\=\s*/ ? $1 : $attr);
$self->log(WARNING => "Illegal character in parameter name '$name'.")
if $name !~ m/^[!#-'*+\-.0-9A-Z^-~]+$/;
Does it help?
--
Regards,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark@Overmeer.net solutions@overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net