Commit 72451a0a authored by VERDIN David's avatar VERDIN David

Following suggestion by reviewer @ikedas: Replacing 'get()' by 'mime_attr()'...

Following suggestion by reviewer @ikedas: Replacing 'get()' by 'mime_attr()' and, therefore, a regular expression by 'eq'.
parent 618f20da
......@@ -2162,10 +2162,10 @@ sub _urlize_one_part {
$filename = Encode::encode_utf8($filename)
if Encode::is_utf8($filename);
} else {
my $content_disposition = $entity->head->get('Content-Disposition');
my $content_disposition = lc($entity->head->mime_attr('Content-Disposition') // '');
if ($entity->effective_type =~ m{\Atext}
&& (!$content_disposition
|| $content_disposition !~ m{\A\s*attachment}
|| $content_disposition eq 'attachment'
)
&& $entity->head->mime_attr('content-type.charset')
){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment