I have doubts regarding this change.

If I understand correctly,  recycle() (and thus recycleInternal()) is
not called when several requests are processed in a row.

So, in the old code sendfile is set to null before each request,  in
the new code it is set to null only once after connection is closed.



2011/6/20  <ma...@apache.org>:
> Author: markt
> Date: Sun Jun 19 21:15:22 2011
> New Revision: 1137440
>
> URL: http://svn.apache.org/viewvc?rev=1137440&view=rev
> Log:
> Reset sendfile data in recycle method so prepareRequest can be pulled up
>
> Modified:
>    tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
>    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
>
> Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=1137440&r1=1137439&r2=1137440&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
> (original)
> +++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Sun 
> Jun 19 21:15:22 2011
> @@ -390,7 +390,8 @@ public class Http11AprProcessor extends
>
>     @Override
>     public void recycleInternal() {
> -        this.socket = null;
> +        socket = null;
> +        sendfileData = null;
>     }
>
>
> @@ -636,7 +637,6 @@ public class Http11AprProcessor extends
>         http09 = false;
>         contentDelimitation = false;
>         expectation = false;
> -        sendfileData = null;
>         if (endpoint.isSSLEnabled()) {
>             request.scheme().setString("https");
>         }
>
> Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1137440&r1=1137439&r2=1137440&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
> (original)
> +++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Sun 
> Jun 19 21:15:22 2011
> @@ -447,15 +447,16 @@ public class Http11NioProcessor extends
>
>     @Override
>     public void recycleInternal() {
> -        this.socket = null;
> -        this.cometClose = false;
> -        this.comet = false;
> +        socket = null;
> +        cometClose = false;
> +        comet = false;
>         remoteAddr = null;
>         remoteHost = null;
>         localAddr = null;
>         localName = null;
>         remotePort = -1;
>         localPort = -1;
> +        sendfileData = null;
>     }
>
>
> @@ -680,7 +681,6 @@ public class Http11NioProcessor extends
>         http09 = false;
>         contentDelimitation = false;
>         expectation = false;
> -        sendfileData = null;
>         if (endpoint.isSSLEnabled()) {
>             request.scheme().setString("https");
>         }
>
>
>
> ---------------------------------------------------------------------
> 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