tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1143457 - in /tomcat/trunk: java/org/apache/coyote/http11/ webapps/docs/
Date Wed, 06 Jul 2011 15:05:45 GMT
Author: markt
Date: Wed Jul  6 15:05:45 2011
New Revision: 1143457

URL: http://svn.apache.org/viewvc?rev=1143457&view=rev
Log:
Correct regression caused by connector re-factoring that meant that sendfile data was not
reset between pipe-lined HTTP requests.

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1143457&r1=1143456&r2=1143457&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Wed Jul  6 15:05:45
2011
@@ -776,6 +776,9 @@ public abstract class AbstractHttp11Proc
         http09 = false;
         contentDelimitation = false;
         expectation = false;
+        
+        prepareRequestInternal();
+
         if (endpoint.isSSLEnabled()) {
             request.scheme().setString("https");
         }
@@ -971,6 +974,12 @@ public abstract class AbstractHttp11Proc
 
 
     /**
+     * Connector implementation specific request preparation. Ideally, this will
+     * go away in the future.
+     */
+    protected abstract void prepareRequestInternal();
+    
+    /**
      * When committing the response, we have to validate the set of headers, as
      * well as setup the response filters.
      */

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=1143457&r1=1143456&r2=1143457&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Wed Jul  6 15:05:45
2011
@@ -621,6 +621,11 @@ public class Http11AprProcessor extends 
 
 
     @Override
+    protected void prepareRequestInternal() {
+        sendfileData = null;
+    }
+
+    @Override
     protected boolean prepareSendfile(OutputFilter[] outputFilters) {
         String fileName = (String) request.getAttribute(
                 "org.apache.tomcat.sendfile.filename");

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=1143457&r1=1143456&r2=1143457&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Wed Jul  6 15:05:45
2011
@@ -676,6 +676,11 @@ public class Http11NioProcessor extends 
 
 
     @Override
+    protected void prepareRequestInternal() {
+        sendfileData = null;
+    }
+
+    @Override
     protected boolean prepareSendfile(OutputFilter[] outputFilters) {
         String fileName = (String) request.getAttribute(
                 "org.apache.tomcat.sendfile.filename");

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1143457&r1=1143456&r2=1143457&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Wed Jul  6 15:05:45 2011
@@ -582,6 +582,11 @@ public class Http11Processor extends Abs
 
 
     @Override
+    protected void prepareRequestInternal() {
+        // NOOP for BIO
+    }
+
+    @Override
     protected boolean prepareSendfile(OutputFilter[] outputFilters) {
         // Should never, ever call this code
         Exception e = new Exception();

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1143457&r1=1143456&r2=1143457&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Jul  6 15:05:45 2011
@@ -86,6 +86,10 @@
         Correct regression caused by connector re-factoring that made AJP
         APR/native connector very unstable on Windows platforms. (markt)
       </fix>
+      <fix>
+        Correct regression caused by connector re-factoring that meant that
+        sendfile data was not reset between pipe-lined HTTP requests. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Tribes">



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


Mime
View raw message