private void shutdown() { // Mark this receiver as shutdown, so that we can // close the connection when the exchange terminates. // We cannot close the connection from here because // the request may still be in process. shutdown = true; // Shutting down the parser may invoke messageComplete() or earlyEOF(). // In case of content delimited by EOF, without a Connection: close // header, the connection will be closed at exchange termination // thanks to the flag we have set above. parser.atEOF(); parser.parseNext(BufferUtil.EMPTY_BUFFER); }
if (BufferUtil.isEmpty(chunk) && (!isOpen() || isOutputShutdown())) parser.atEOF(); parser.parseNext(BufferUtil.EMPTY_BUFFER); break loop;