Author: markt
Date: Wed Sep 30 13:50:36 2015
New Revision: 1706036

URL: http://svn.apache.org/viewvc?rev=1706036&view=rev
Log:
Align CLOSE with other implementations
- call COMMIT first
- handle the flush in the close/finish/end/whatever method

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=1706036&r1=1706035&r2=1706036&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/Stream.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Stream.java Wed Sep 30 13:50:36 
2015
@@ -430,8 +430,9 @@ public class Stream extends AbstractStre
             return written;
         }
 
-        public void close() {
+        public void close() throws IOException {
             closed = true;
+            flushData();
         }
 
         public boolean isClosed() {

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=1706036&r1=1706035&r2=1706036&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java Wed Sep 30 
13:50:36 2015
@@ -131,10 +131,12 @@ public class StreamProcessor extends Abs
             break;
         }
         case CLOSE: {
-            // Tell the output buffer there will be no more data
-            stream.getOutputBuffer().close();
-            // Then flush it
-            action(ActionCode.CLIENT_FLUSH, null);
+            action(ActionCode.COMMIT, null);
+            try {
+                stream.getOutputBuffer().close();
+            } catch (IOException ioe) {
+                // TODO
+            }
             break;
         }
         case CLIENT_FLUSH: {



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

Reply via email to