docs: public void closeResponseOutput(boolean releaseChannel) {
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){
              logger.entering(CLASS_NAME, "closeResponseOutput","["+this+"]");
              logger.logp (Level.FINE, CLASS_NAME, "closeResponseOutput", "releaseChannel->"+releaseChannel+", writerClosed->"+writerClosed);
          }
          // if user hasn't closed stream or writer on a forward, close it for them
          if (writerClosed == false) {
              // PK63328 starts - last flush to OutputStream
  
              boolean isArdEnabled = false;
              if (WebContainer.getWebContainer().getWebContainerConfig().isArdEnabled()) {
                  if (((WebAppDispatcherContext) _connContext.getRequest().getWebAppDispatcherContext()).getWebApp().getWebAppConfig().isArdEnabled()) {
                      isArdEnabled = true;
                      //PK89810 Start                     
                      WebContainerRequestState reqState = WebContainerRequestState.getInstance(true);
                      reqState.setAttribute("com.ibm.ws.webcontainer.appIsArdEnabled", true);                     
                      //PK89810 End
                  }
              }
  
              //The goal of this logic is to close the response, release the channel, and send as Content-Length instead of chunked.
              //Previously we tried to just call close after calling setLastBuffer, but that doesn't work because if there is anything
              //already in the Channel's byte buffer queue you don't want to indicate its the last buffer before you're really ready and truncate the response.
              //Therefore, we must call flush with flushMode false so we can get all the data to the channel without it trying to
              //send everything out to the client before its really the last buffer. We gate the checks with if (!isArdEnabled) so
              //we don't indicate that the response is finished until we exit back out through the stack. Otherwise, it could try to close
              //the connection and invalidate the request before we're even out of the Servlet container/servlet call stack
  
              //All of this next if block is totally new since PK63328
              if (!isArdEnabled){
                  _response.setFlushMode(false);
                  _response.setIsClosing(true);
                  try{
                      if (_gotOutputStream == true){
                          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){
                              logger.logp (Level.FINE, CLASS_NAME, "closeResponseOutput", "flush output stream");
                          }
                          if ( !(_bufferedOut instanceof WCOutputStream) || !((WCOutputStream)_bufferedOut).isClosed())
                              _bufferedOut.flush();
                      }
                      else if (_gotWriter == true){
                          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){
                              logger.logp (Level.FINE, CLASS_NAME, "closeResponseOutput", "flush writer");
                          }
                          _pwriter.flush();
                      }
                  }
                  catch (Throwable th){
                      if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.SEVERE)) {
                          logger.logp (Level.SEVERE, CLASS_NAME, "closeResponseOutput", "Error.while.flushing.last.response");
                      }
                  }
  
                  _response.setFlushMode(true);
              }
  
              //This code was always here minus the check for isArdEnabled and setLastBuffer(true)
              //so we should continue calling close even for ard
              //
              try {
                  if (_gotOutputStream == true) {
                      if (!isArdEnabled){
                          //PK89810
                          // PM18543 - Add test for WCCustomProperties.COMPLETE_DATA_RESPONSE
                          if (WCCustomProperties.COMPLETE_DATA_RESPONSE && !WCCustomProperties.FINISH_RESPONSE_ON_CLOSE){
                              if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){
                                  logger.logp (Level.FINE, CLASS_NAME, "closeResponseOutput", "setLastBuffer to true ");
                              }
                              _response.setLastBuffer(true); //PK89810,  setLastBuffer in  finish of BufferedWriter if CP is set
                          }
                      }
  
                      _bufferedOut.close();
                      _rawOut.close();
                  }
                  else if (_gotWriter == true) {
                      if (!isArdEnabled){
                          //PK89810
                          // PM18543 - Add test for WCCustomProperties.COMPLETE_DATA_RESPONSE
                          if (WCCustomProperties.COMPLETE_DATA_RESPONSE && !WCCustomProperties.FINISH_RESPONSE_ON_CLOSE){
                              if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){
                                  logger.logp (Level.FINE, CLASS_NAME, "closeResponseOutput", "setLastBuffer to true ");
                              }
                              _response.setLastBuffer(true); //PK89810 ,  setLastBuffer in finish of BufferedServletOutputStream if CP is set
                          }
                      }
                      // PK63328 ends
                      _pwriter.close();
                      _rawOut.close();
                  }
  // code below LIBERTY only
                  if (releaseChannel)
                  {
                      _response.releaseChannel();
                      WebContainerRequestState.getInstance(true).setCompleted(true);
                  }
  // code above LIBERTY only
              }
              catch (Throwable th) {
                  logger.logp(Level.SEVERE, CLASS_NAME,"closeResponseOutput", "Error.while.closing.response.output",th);
              }
          }
          //Not sure if we should be doing this outside of writeClosed
          //This is not called by default. Only by WebServices and AsyncServlet completion
          if (releaseChannel){
              //check to avoid double release
              WebContainerRequestState reqState = WebContainerRequestState.getInstance(true);
              if (! reqState.isCompleted()) {
                  _response.releaseChannel();
                  if (reqState.getCurrentThreadsIExtendedRequest()==this.getRequest())
                      WebContainerRequestState.getInstance(true).setCompleted(true);
              }
          }
          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){
              logger.exiting(CLASS_NAME, "closeResponseOutput");
          }
      }