From: <bra...@us...> - 2009-05-20 02:49:41
|
Revision: 2727 http://archive-access.svn.sourceforge.net/archive-access/?rev=2727&view=rev Author: bradtofel Date: 2009-05-20 02:49:24 +0000 (Wed, 20 May 2009) Log Message: ----------- BUGFIX(unreported): Was assigning the content-encoding before setting headers, allowing original headers to override our setting. Now we set the encoding after setting the other headers. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextReplayRenderer.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextReplayRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextReplayRenderer.java 2009-05-20 02:47:33 UTC (rev 2726) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextReplayRenderer.java 2009-05-20 02:49:24 UTC (rev 2727) @@ -95,10 +95,11 @@ // the "Content-Type" HTTP header, then Tomcat will use the default.. // who knows what that is, or what that will do to the page.. // let's try explicitly setting it to what we used: - httpResponse.setCharacterEncoding(page.getCharSet()); + headers.put("X-Wayback-Guessed-Charset", page.getCharSet()); // send back the headers: HttpHeaderOperation.sendHeaders(headers, httpResponse); + httpResponse.setCharacterEncoding(page.getCharSet()); page.writeToOutputStream(httpResponse.getOutputStream()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |