myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1461883 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
Date Wed, 27 Mar 2013 22:33:32 GMT
Author: lu4242
Date: Wed Mar 27 22:33:31 2013
New Revision: 1461883

URL: http://svn.apache.org/r1461883
Log:
MYFACES-3695 'Cannot set header. Response already committed.' on WebSphere Application Server
7 and 8 (do not write header if response was already committed)

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java?rev=1461883&r1=1461882&r2=1461883&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ResourceHandlerImpl.java
Wed Mar 27 22:33:31 2013
@@ -405,7 +405,10 @@ public class ResourceHandlerImpl extends
                 {
                     int count = pipeBytes(in, out, buffer);
                     //set the content lenght
-                    httpServletResponse.setContentLength(count);
+                    if (!httpServletResponse.isCommitted())
+                    {
+                        httpServletResponse.setContentLength(count);
+                    }
                 }
                 finally
                 {



Mime
View raw message