incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r713028 - /incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java
Date Tue, 11 Nov 2008 13:04:31 GMT
Author: fmeschbe
Date: Tue Nov 11 05:04:31 2008
New Revision: 713028

URL: http://svn.apache.org/viewvc?rev=713028&view=rev
Log:
SLING-726 Not calling wrapped response's setCharacterEncoding
method in case the writer has already been called

Modified:
    incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java

Modified: incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java?rev=713028&r1=713027&r2=713028&view=diff
==============================================================================
--- incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java
(original)
+++ incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java
Tue Nov 11 05:04:31 2008
@@ -284,10 +284,19 @@
     }
 
     public void setContentType(String type) {
+        // SLING-726 No handling required since this seems to be correct
         this.registerHeader(HEADER_CONTENT_TYPE, type, false);
         super.setContentType(type);
     }
 
+    @Override
+    public void setCharacterEncoding(String charset) {
+        // SLING-726 Ignore call if getWriter() has been called
+        if (writer == null) {
+            super.setCharacterEncoding(charset);
+        }
+    }
+    
     public void setDateHeader(String name, long date) {
         this.registerHeader(name, toDateString(date), false);
         super.setDateHeader(name, date);



Mime
View raw message