You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Benoit Tellier (Jira)" <mi...@james.apache.org> on 2022/05/19 08:27:00 UTC

[jira] [Closed] (MIME4J-246) filename multipart in attachments

     [ https://issues.apache.org/jira/browse/MIME4J-246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benoit Tellier closed MIME4J-246.
---------------------------------
    Fix Version/s: 0.8.7
       Resolution: Fixed


{code:java}
    @Test
    public void mime4j246() throws Exception {
        ContentDispositionField f = parse("Content-Disposition: attachment;\n" +
            " filename*0*=UTF-8''%D9%82%D9%88%D8%A7%D9%86%DB%8C%D9%86%20%D9%84%DB%8C%DA;\n" +
            " filename*1*=%AF%20%D9%81%D9%88%D8%AA%D8%A8%D8%A7%D9%84%20%D8%AF%D8%B3%D8;\n" +
            " filename*2*=%AA%DB%8C%2E%70%64%66");
        Assert.assertEquals("قوانین لیگ فوتبال دستی.pdf", f.getFilename());
    }
{code}

Passes in LenientContentDispositionFieldTest


> filename multipart in attachments
> ---------------------------------
>
>                 Key: MIME4J-246
>                 URL: https://issues.apache.org/jira/browse/MIME4J-246
>             Project: James Mime4j
>          Issue Type: Bug
>            Reporter: mahdi
>            Priority: Major
>             Fix For: 0.8.7
>
>         Attachments: lig.eml
>
>
> one of my mails that it has an attachment and header of this attachment is like this:
> Content-Type: application/pdf;
>  name="=?UTF-8?B?bbjNmGINmE24zaryDZg?="
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment;
>  filename*0*=UTF-8''%D984%DB%8C%DA;
>  filename*1*=%AF%20%D8%AF%D8%B3%D8;
>  filename*2*=%AA%DB%8C%2E%70%64%66
> When I call `getFilename()` method it return null
> I attach the mail to this task



--
This message was sent by Atlassian Jira
(v8.20.7#820007)