https://issues.apache.org/bugzilla/show_bug.cgi?id=46770





--- Comment #14 from Rainer Jung <rainer.j...@kippdata.de>  2009-02-26 07:56:51 
PST ---
My test for the proposed patch was wrong.

The situation is (as always) more complicated:

The flushing does not commit the response.

Remember, that the servvlet does:

    response.setContentLength(0);
    response.getOutputStream().print("");
    response.flushBuffer();

flushBuffer() triggers OutputBuffer.doFlush(). In there we already have state
== CHAR_STATE. In this case we do not call coyoteResponse.sendHeaders() and
thus the coyoteResponse doesn't get committed.

Then we trigger ACTION_CLIENT_FLUSH.

By revision r580815 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=580815 ) 
we immediately do ACTION_COMMIT inside
ACTION_CLIENT_FLUSH.

This in turn calls JkInputStream.appendHead(), which sends the headers without
committing.

Later from Response.finishResponse() we do ACTION_CLOSE, which in turn again
does ACTION_COMMIT and we send out the headers a second time.

I guess at least at the end of the first ACTION_COMMIT we should have called
coyoteResponse.setCommitted(true). The question is: where exactly should we do
that?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

Reply via email to