• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

It doesn’t record the character set that the bytes were sent in when cached, and then converts these into a string using the default encoding.

If you change the writeResponse method of PageFragmentCachingFilter to

protected void writeResponse(final HttpServletResponse response, final PageInfo pageInfo) throws IOException { // Write the page final byte[] cachedPage = pageInfo.getUngzippedBody();

String implementationVendor = response.getClass().getPackage().getImplementationVendor();
if (implementationVendor != null && implementationVendor.equals("\"Evermind\"")) {
  response.getOutputStream().write(cachedPage);
}
else {
  final String page = new String(cachedPage, response.getCharacterEncoding());
  response.getWriter().write(page);
}   \}

(note the new String(cachedPage, response.getCharacterEncoding()) where it was new String(cachedPage) )

then it seems to wrk Sourceforge Ticket ID: 1753349 - Opened By: dwsheldon - 13 Jul 2007 10:17 UTC

Comments

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira