Author: markt
Date: Wed Sep 16 20:17:34 2015
New Revision: 1703458

URL: http://svn.apache.org/r1703458
Log:
Refactor. It makes more sense to have all the init code in one place.

Modified:
    tomcat/trunk/java/org/apache/coyote/http2/Stream.java
    tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/Stream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Stream.java?rev=1703458&r1=1703457&r2=1703458&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/Stream.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Stream.java Wed Sep 16 20:17:34 
2015
@@ -71,6 +71,8 @@ public class Stream extends AbstractStre
             // TODO Assuming the body has been read at this point is not valid
             state.recievedEndOfStream();
         }
+        // No sendfile for HTTP/2 (it is enabled by default in the request)
+        this.coyoteRequest.setSendfile(false);
         this.coyoteResponse.setOutputBuffer(outputBuffer);
         this.coyoteRequest.setResponse(coyoteResponse);
     }

Modified: tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java?rev=1703458&r1=1703457&r2=1703458&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java Wed Sep 16 
20:17:34 2015
@@ -54,8 +54,6 @@ public class StreamProcessor extends Abs
     @Override
     public void run() {
         try {
-            // No sendfile for HTTP/2
-            request.setSendfile(false);
             adapter.service(request, response);
             // Ensure the response is complete
             response.action(ActionCode.CLOSE, null);



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

Reply via email to