2014-05-29 18:39 GMT+04:00  <ma...@apache.org>:
> Author: markt
> Date: Thu May 29 14:39:25 2014
> New Revision: 1598307
>
> URL: http://svn.apache.org/r1598307
> 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()

There are several places where ActionCode.RESET is used.
Implementation of action(ActionCode.RESET) are different between
AbstractHttp11Processor and AbstractAjpProcessor.
I can track the above reasoning for HTTP only.

I wonder why AJP behaves differently and suspect that this change may break it.


> Modified:
>     tomcat/trunk/java/org/apache/coyote/Response.java
>     tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java
>
> Modified: tomcat/trunk/java/org/apache/coyote/Response.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?rev=1598307&r1=1598306&r2=1598307&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/coyote/Response.java (original)
> +++ tomcat/trunk/java/org/apache/coyote/Response.java Thu May 29 14:39:25 2014
> @@ -269,16 +269,7 @@ public final class Response {
>              throw new IllegalStateException();
>          }
>
> -        contentType = null;
> -        locale = DEFAULT_LOCALE;
> -        contentLanguage = null;
> -        characterEncoding = Constants.DEFAULT_CHARACTER_ENCODING;
> -        contentLength = -1;
> -        charsetSet = false;
> -
> -        status = 200;
> -        message = null;
> -        headers.clear();
> +        recycle();
>
>          // Reset the stream
>          action(ActionCode.RESET, this);
>
> Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java?rev=1598307&r1=1598306&r2=1598307&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java 
> (original)
> +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java Thu 
> May 29 14:39:25 2014
> @@ -318,8 +318,6 @@ public abstract class AbstractOutputBuff
>              throw new 
> IllegalStateException(sm.getString("iob.illegalreset"));
>          }
>
> -        // 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-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

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

Reply via email to