Author: mturk
Date: Thu Feb  3 10:23:20 2011
New Revision: 1066772

URL: http://svn.apache.org/viewvc?rev=1066772&view=rev
Log:
Make sure flush packet is not send after END_RESPONSE packet. Should handle 
BZ49929

Modified:
    tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
    tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1066772&r1=1066771&r2=1066772&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Thu Feb  3 
10:23:20 2011
@@ -663,7 +663,7 @@ public class AjpAprProcessor extends Abs
             outputBuffer.clear();
         }
         // Send explicit flush message
-        if (explicit) {
+        if (explicit && !finished) {
             if (Socket.sendb(socketRef, flushMessageBuffer, 0,
                     flushMessageBuffer.position()) < 0) {
                 throw new 
IOException(sm.getString("ajpprocessor.failedflush"));

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=1066772&r1=1066771&r2=1066772&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Thu Feb  3 
10:23:20 2011
@@ -578,8 +578,10 @@ public class AjpProcessor extends Abstra
      */
     @Override
     protected void flush(boolean explicit) throws IOException {
-        // Send the flush message
-        output.write(flushMessageArray);
+        if (!finished) {
+            // Send the flush message
+            output.write(flushMessageArray);
+        }
     }
 
 



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

Reply via email to