You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Vsevolod Poletaev (JIRA)" <ji...@apache.org> on 2016/06/04 16:13:59 UTC
[jira] [Issue Comment Deleted] (FILEUPLOAD-274) File Upload falis
to recognize RFC 5987-compliant filename
[ https://issues.apache.org/jira/browse/FILEUPLOAD-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vsevolod Poletaev updated FILEUPLOAD-274:
-----------------------------------------
Comment: was deleted
(was: 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)