Export to GitHub

primefaces - issue #4266

FileUploadFilter's MultipartRequest does not use the request encoding


Posted on Jun 26, 2012 by Massive Lion

When using PrimeFaces FileUploadFilter, the platform default character encoding will be used for form fields instead of the one set in the HTTP servlet request as done by HttpServletRequest#setCharacterEncoding().

Basically, line 85 of MultipartRequest

formParams.get(item.getFieldName()).add(item.getString());

needs to be changed as follows

formParams.get(item.getFieldName()).add(item.getString(request.getCharacterEncoding()));

Check for null values though.

Comment #1

Posted on Jun 26, 2012 by Massive Lion

Line 88 also needs to be fixed the same way by the way.

Comment #2

Posted on Jun 28, 2012 by Happy Dog

This issue is duplicate of http://code.google.com/p/primefaces/issues/detail?id=3002

Comment #3

Posted on Jul 13, 2013 by Swift Rhino

(No comment was entered for this change.)

Status: Duplicate

Labels:
Priority-Medium Type-Defect TargetVersion-FUTURE