commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holger Sunke (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FILEUPLOAD-206) Encoding of parts incorrectly determined and assumed to be
Date Mon, 04 Jun 2012 09:19:23 GMT
Holger Sunke created FILEUPLOAD-206:
---------------------------------------

             Summary: Encoding of parts incorrectly determined and assumed to be
                 Key: FILEUPLOAD-206
                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-206
             Project: Commons FileUpload
          Issue Type: Bug
            Reporter: Holger Sunke
             Fix For: 1.2.2


When submitting user input form fields with a form having enctype="multipart/form-data", FileUpload
assumes "ISO-8...-1" to be the default encoding for each part, not taking that request.getContentEncoding()
returns "UTF-8".

The description of FILEUPLOAD-101 states: "Each individual part in the 'multipart/form-data'
encoded requests may have its own content type definition."

In my opinion, this assumption is wrong, as the the multipart/form-data encoding algorithm
tells the right opposite regarding form fields not beeing files:

"... The parts of the generated multipart/form-data resource that correspond to non-file fields
must not have a Content-Type header specified. Their names and values must be encoded using
the character encoding selected above (field names in particular do not get converted to a
7-bit safe encoding as suggested in RFC 2388)..."
See: http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#multipart-form-data

So for now as user of FileUpload, i don't see a way to tell FileUpload that my FormFields
are UTF-8 encoded, resulting in corrupted user input.
Even request.setContentEncoding("UTF-8"); does not help, neither <form ... accept-charset="UTF-8"
...> does.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message