[
https://issues.jboss.org/browse/GTNPC-78?page=com.atlassian.jira.plugin.s...
]
Matt Wringe commented on GTNPC-78:
----------------------------------
The ServeResourceActionListener has been updated to no longer user
ContentResponse.getContent and it uses .getBytes and .getChars instead.
The ContentResponse.getContent method still needs to be fixed in the PC component.
Text encoding is lost in serveResources
----------------------------------------
Key: GTNPC-78
URL:
https://issues.jboss.org/browse/GTNPC-78
Project: GateIn Portlet Container
Issue Type: Bug
Components: API
Affects Versions: 2.2.0-GA
Reporter: Martin Weiler
Fix For: 2.2.1-GA
Attachments: serveresourcestest.zip
When a resource is served the content type (mime type) is checked. If the mime type
starts with "text"
(org.exoplatform.portal.webui.application.UIPortletActionListener line 440-444) a new
String is created (org.gatein.pc.api.invocation.response.ContentResponse line 127)
If a file was uploaded with a different encoding than the current file encoding this
makes the String unreadable. ContentResponse.getContent() creates a new String using the
String(byte[]) constructor. In this case the file encoding used on the server is used.
This might be a different encoding (e.g. UTF-8) causing the text to be scrambled.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira