You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/09/12 15:16:41 UTC
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 OutputBuffer.java
remm 2003/09/12 06:16:41
Modified: catalina/src/share/org/apache/coyote/tomcat5
OutputBuffer.java
Log:
- When flush is called, call the appropriate action to do a lower level flush.
- Don't flush at the end of request processing.
Revision Changes Path
1.6 +18 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/OutputBuffer.java
Index: OutputBuffer.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/OutputBuffer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- OutputBuffer.java 2 Sep 2003 21:21:59 -0000 1.5
+++ OutputBuffer.java 12 Sep 2003 13:16:41 -0000 1.6
@@ -68,6 +68,7 @@
import java.util.HashMap;
import org.apache.catalina.connector.ClientAbortException;
+import org.apache.coyote.ActionCode;
import org.apache.coyote.Response;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.C2BConverter;
@@ -321,7 +322,7 @@
}
}
- flush();
+ doFlush(false);
closed = true;
coyoteResponse.finish();
@@ -336,6 +337,17 @@
*/
public void flush()
throws IOException {
+ doFlush(true);
+ }
+
+
+ /**
+ * Flush bytes or chars contained in the buffer.
+ *
+ * @throws IOException An underlying IOException occurred
+ */
+ protected void doFlush(boolean realFlush)
+ throws IOException {
if (suspended)
return;
@@ -352,6 +364,11 @@
coyoteResponse.sendHeaders();
}
doFlush = false;
+
+ if (realFlush) {
+ coyoteResponse.action(ActionCode.ACTION_CLIENT_FLUSH,
+ coyoteResponse);
+ }
}