-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Automation, WebEngine
We parse MultiPart request in 2 different ways:
- In Automation, it uses MultiPartRequestReader and MultiPartFormRequestReader classes, which use javax.mail.*.
- In Batch Upload (and WebEngine), it uses FormData, which use Apache Commons Fileupload.
We have an issue on the filename, when it contains other characters than the one in US-ASCII.
Commons Fileupload reads correctly encoded filename in the header, as it uses UTF-8 encoding by default.
However, javax.mail seems to fail at it, it cannot decode correctly the filename. To make it correctly decode the filename, we should use {{ filename*=UTF-8''}} in the part header:
...
form-data; name="file"; filename*=UTF-8''blablaéèôûü__.txt
...
Browsers (at least Chrome and Firefox) send only filename in the part header:
... form-data; name="file"; filename="blablaéèôûü__.txt" ...
=> We should probably align all the code to use Apache Commons Fileupload to parse MultiPart requests, and make sure we send correctly encoded part headers.