Commits

Anonymous committed c8dc88b

Regarding content encoding
Submitted by: Lars Torunski

Comments (0)

Files changed (1)

src/core/java/com/opensymphony/oscache/web/filter/CacheHttpServletResponseWrapper.java

 import org.apache.commons.logging.LogFactory;
 
 import java.io.IOException;
+import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 
 import java.util.Locale;
      */
     public PrintWriter getWriter() throws IOException {
         if (cachedWriter == null) {
-            cachedWriter = new PrintWriter(getOutputStream());
+            cachedWriter = new PrintWriter(new OutputStreamWriter(getOutputStream(), result.getContentEncoding()));
         }
 
         return cachedWriter;