Skip to content

Commit

Permalink
Make sure flush packet is not send after END_RESPONSE packet. Should …
Browse files Browse the repository at this point in the history
…handle BZ49929

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1066772 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mturk committed Feb 3, 2011
1 parent 300884b commit 839a3c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion java/org/apache/coyote/ajp/AjpAprProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ protected void flush(boolean explicit) throws IOException {
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"));
Expand Down
6 changes: 4 additions & 2 deletions java/org/apache/coyote/ajp/AjpProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,10 @@ else if (messageLength == 0) {
*/
@Override
protected void flush(boolean explicit) throws IOException {
// Send the flush message
output.write(flushMessageArray);
if (!finished) {
// Send the flush message
output.write(flushMessageArray);
}
}


Expand Down

0 comments on commit 839a3c5

Please sign in to comment.