I'm sure there's a great reason for setting B_EOUT flag here, but it sure does suck if you have data waiting to be sent to the client since setting B_EOUT convinces ap_bclose() not to write any more data.
It is only set when the connection is aborted or the fd is gone, both indicating that we can't write any more data. I think you need to figure out why the conditional above it is false and then fix the root of the problem. My guess is that
r->connection->aborted is being set incorrectly somewhere. ....Roy
