} else {
try {
appendHead( res );
} catch(IOException iex) {
log.warn("Unable to send headers",iex);
MsgContext ep=(MsgContext)res.getNote( epNote );
ep.setStatus(JK_STATUS_ERROR);
}
}
} else if( actionCode==ActionCode.ACTION_RESET ) {
if( log.isDebugEnabled() )
log.debug("RESET " );
} else if( actionCode==ActionCode.ACTION_CLIENT_FLUSH ) {
if( log.isDebugEnabled() ) log.debug("CLIENT_FLUSH " );
org.apache.coyote.Response res=(org.apache.coyote.Response)param;
MsgContext ep=(MsgContext)res.getNote( epNote );
ep.setType( JkHandler.HANDLE_FLUSH );
try {
ep.getSource().flush( null, ep );
} catch(IOException iex) {
// This is logged elsewhere, so debug only here
log.debug("Error during flush",iex);
res.setErrorException(iex);
ep.setStatus(JK_STATUS_ERROR);
}
} else if( actionCode==ActionCode.ACTION_CLOSE ) {
if( log.isDebugEnabled() ) log.debug("CLOSE " );
org.apache.coyote.Response res=(org.apache.coyote.Response)param;
MsgContext ep=(MsgContext)res.getNote( epNote );
if( ep.getStatus()== JK_STATUS_CLOSED ) {
// Double close - it may happen with forward
if( log.isDebugEnabled() ) log.debug("Double CLOSE - forward ? " + res.getRequest().requestURI() );
return;
}
if( !res.isCommitted() )
this.action( ActionCode.ACTION_COMMIT, param );
MsgAjp msg=(MsgAjp)ep.getNote( headersMsgNote );
msg.reset();
msg.appendByte( HandlerRequest.JK_AJP13_END_RESPONSE );
msg.appendByte( 1 );
try {
ep.setType( JkHandler.HANDLE_SEND_PACKET );
ep.getSource().send( msg, ep );
ep.setType( JkHandler.HANDLE_FLUSH );
ep.getSource().flush( msg, ep );
} catch(IOException iex) {
log.debug("Connection error ending request.",iex);
ep.setStatus(JK_STATUS_ERROR);
}
if(ep.getStatus() != JK_STATUS_ERROR) {
ep.setStatus(JK_STATUS_CLOSED );
}
if( logTime.isDebugEnabled() )
logTime(res.getRequest(), res);
} else if( actionCode==ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) {