Subject: | Mail::Message::Body lost critical information from multipart/signed |
If you try to creat a new message body based on a body with the
following "Content-Type":
Content-Type: multipart/signed;
protocol="application/x-pkcs7-signature";
micalg=SHA1;
boundary="----=_NextPart_000_008E_01CBD1E6.31A34CE0"
the new message body will end up with:
Content-Type: multipart/signed;
boundary="----=_NextPart_000_008E_01CBD1E6.31A34CE0"
The protocol and micalg fields are lost.
The following patch fixes the issue:
--- lib/Mail/Message/Body/Multipart.pm~ 2011-07-15 11:56:00.000000000 -
0700
+++ lib/Mail/Message/Body/Multipart.pm 2011-07-15 11:55:54.000000000 -
0700
@@ -22,7 +22,7 @@
{ my ($self, $args) = @_;
my $based = $args->{based_on};
$args->{mime_type} ||=
- defined $based ? $based->mimeType : 'multipart/mixed';
+ defined $based ? $based->type : 'multipart/mixed';
$self->SUPER::init($args);