tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1602268 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/Response.java java/org/apache/coyote/http11/AbstractOutputBuffer.java
Date Thu, 12 Jun 2014 19:01:38 GMT
Author: markt
Date: Thu Jun 12 19:01:37 2014
New Revision: 1602268

URL: http://svn.apache.org/r1602268
Log:
Simplify logic
Call Response.recycle() from Response.reset() rather than in Response.reset():
 - doing ~half of what recycle() does
 - calling ActionCode.RESET which resets the OutputBuffer which in turn calls Response.recycle()

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

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

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=1602268&r1=1602267&r2=1602268&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 19:01:37 2014
@@ -263,17 +263,9 @@ public final class Response {
             throw new IllegalStateException();
         }
 
-        contentType = null;
-        locale = DEFAULT_LOCALE;
-        contentLanguage = null;
-        characterEncoding = Constants.DEFAULT_CHARACTER_ENCODING;
-        contentLength = -1;
-        charsetSet = false;
+        recycle();
 
-        status = 200;
-        message = null;
-        headers.clear();
-        
+        // Reset the stream
         action(ActionCode.RESET, this);
     }
 

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java?rev=1602268&r1=1602267&r2=1602268&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java Thu Jun 12
19:01:37 2014
@@ -248,8 +248,6 @@ public abstract class AbstractOutputBuff
         if (committed)
             throw new IllegalStateException(/*FIXME:Put an error message*/);
 
-        // Recycle Request object
-        response.recycle();
         // These will need to be reset if the reset was triggered by the error
         // handling if the headers were too large
         pos = 0;



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


Mime
View raw message