public static void closePayloadAndPublish( HTTPUtilResponse that, byte[] eTag, HTTPContentType contentTypeEnum, Pipe<ServerResponseSchema> output, long activeChannelId, int activeSequenceNo, int activeFieldRequestContext, ChannelWriter outputStream, HeaderWritable additionalHeaderWriter, int status) { storeChnlAndSeqInHeaderFragment(that, output, activeChannelId, activeSequenceNo); byte[] contentType = null!=contentTypeEnum ? contentTypeEnum.getBytes() : null; int totalLengthWritten = outputStream.length(); //this is a key pronghorn pattern in use here output.closeBlobFieldWrite(); //closed because we will add each part below... HTTPUtil.prependBodyWithHeader(output, eTag, totalLengthWritten, that, activeFieldRequestContext, activeChannelId, activeSequenceNo, contentType, additionalHeaderWriter, status);//context }