-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
root@1f1df024bf37:~# perl -MEmail::MIME -e 'Email::MIME->new(join "", <>)' <<EOD
Content-Type: application/gzip;
name="=?UTF-8?Q?b=c3=a4r.gz?="
EOD
Unquoted '"' not allowed at -e line 1.
Missing semicolon before parameter '"b�r.gz"' at -e line 1.
root@1f1df024bf37:~# patch -p1 /usr/share/perl5/Email/MIME.pm < content_type.patch
patching file /usr/share/perl5/Email/MIME.pm
root@1f1df024bf37:~# perl -MEmail::MIME -e 'Email::MIME->new(join "", <>)' <<EOD
Content-Type: application/gzip;
name="=?UTF-8?Q?b=c3=a4r.gz?="
EOD
root@1f1df024bf37:~# cat content_type.patch
--- /usr/share/perl5/Email/MIME.pm 2019-10-25 13:17:37.734030211 +0000
+++ /usr/share/perl5/Email/MIME.pm.patched 2019-10-25 13:12:08.753521633 +0000
@@ -134,7 +134,7 @@
my $self = shift->SUPER::new($text, $arg, @rest);
$self->encode_check_set($encode_check);
- $self->{ct} = parse_content_type($self->content_type);
+ $self->{ct} = parse_content_type($self->content_type_raw);
$self->parts;
return $self;
}
@@ -422,6 +422,7 @@
sub force_decode_hook { 0 }
sub decode_hook { return $_[1] }
sub content_type { scalar shift->header("Content-type"); }
+sub content_type_raw { scalar shift->header_raw("Content-type"); }
sub debug_structure {
my ($self, $level) = @_;
root@1f1df024bf37:~#
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels