Author: markt
Date: Thu Jun 12 17:43:33 2014
New Revision: 1602247

URL: http://svn.apache.org/r1602247
Log:
Check committed before changing any field values
Remove various incorrect comments

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/coyote/Response.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1598304

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/Response.java?rev=1602247&r1=1602246&r2=1602247&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/Response.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/Response.java Thu Jun 12 
17:43:33 2014
@@ -259,8 +259,10 @@ public final class Response {
 
     public void reset() throws IllegalStateException {
         
-        // Reset the headers only if this is the main request,
-        // not for included
+        if (commited) {
+            throw new IllegalStateException();
+        }
+
         contentType = null;
         locale = DEFAULT_LOCALE;
         contentLanguage = null;
@@ -272,15 +274,6 @@ public final class Response {
         message = null;
         headers.clear();
         
-        // Force the PrintWriter to flush its data to the output
-        // stream before resetting the output stream
-        //
-        // Reset the stream
-        if (commited) {
-            //String msg = sm.getString("servletOutputStreamImpl.reset.ise"); 
-            throw new IllegalStateException();
-        }
-        
         action(ActionCode.RESET, this);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to