[
https://issues.apache.org/jira/browse/FILEUPLOAD-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15315554#comment-15315554
]
Vsevolod Poletaev commented on FILEUPLOAD-274:
----------------------------------------------
Sure,
@Test
public void testFileUploadRFC5987() throws IOException, FileUploadException
{
/**
* This is absolutely correct request according to this
https://tools.ietf.org/html/rfc5987#section-3.2.1
* but recognized incorrectly
*/
List<FileItem> fileItems =
parseUpload("--9e90ba14da4343858038f79538cb744b\n" +
"Content-Disposition: form-data; name*=utf-8''%D0%B0%D0%B1%D0%B2;
filename*=utf-8''%D0%B0%D0%B1%D0%B2\n" +
"\n" +
"This file's name contains some non-ascii characters\n" +
"--9e90ba14da4343858038f79538cb744b--");
assertEquals(1, fileItems.size());
FileItem file = fileItems.get(0);
assertEquals("абв", file.getFieldName());
assertFalse(file.isFormField());
assertEquals("This file's name contains some non-ascii
characters\n", file.getString());
assertEquals("абв", file.getName());
}
> File Upload falis to recognize RFC 5987-compliant filename
> ----------------------------------------------------------
>
> Key: FILEUPLOAD-274
> URL: https://issues.apache.org/jira/browse/FILEUPLOAD-274
> Project: Commons FileUpload
> Issue Type: Bug
> Affects Versions: 1.3.2
> Reporter: Vsevolod Poletaev
>
> I think there is incorrect behaviour in getFileName() method of
> FileUploadBase class, as it ignores RFC-5987-compliant filename* parameter,
> and then findNextItem() method incorrectly treats this part of request as
> form filed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)