[
https://issues.apache.org/jira/browse/MYFACES-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonardo Uribe resolved MYFACES-2008.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.1.7-SNAPSHOT
Assignee: Leonardo Uribe
Thanks to Taro App for provide us this patch
> Character encoding in Content-Type is ignored
> ---------------------------------------------
>
> Key: MYFACES-2008
> URL: https://issues.apache.org/jira/browse/MYFACES-2008
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 1.1.6
> Reporter: Taro App
> Assignee: Leonardo Uribe
> Fix For: 1.1.7-SNAPSHOT
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> In a constructor of ServletExternalContextImpl.java, if character encoding is
> looked up from Content-Type header, it is not set on request character
> encoding.
> This bug exists in MyFaces Core 1.1.6 and also in SVN trunk for 1.1.
> This bug does not exists in 1.2.x. (The logic is moved to
> calculateCharacterEncoding method, and fixed there.)
> Current Code:
> ----------------------------------------
> if (characterEncoding == null) {
> HttpSession session = httpServletRequest.getSession(false);
> if (session != null) {
> characterEncoding = (String)
> session.getAttribute(ViewHandler.CHARACTER_ENCODING_KEY);
> }
> if (characterEncoding != null) {
> setCharacterEncodingMethod.invoke(servletRequest, new
> Object[]{characterEncoding});
> }
> }
> ----------------------------------------
> Should be fixed to:
> ----------------------------------------
> if (characterEncoding == null) {
> HttpSession session = httpServletRequest.getSession(false);
> if (session != null) {
> characterEncoding = (String)
> session.getAttribute(ViewHandler.CHARACTER_ENCODING_KEY);
> }
> }
> if (characterEncoding != null) {
> setCharacterEncodingMethod.invoke(servletRequest, new
> Object[]{characterEncoding});
> }
> ----------------------------------------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.