/** * Called when the headers are commited. At this point of time we have to decide whether we * force chunked encoding. */ private void commitHeaderData() { if (headerCommitted) { return; } headerCommitted = true; if (isNonHtmlContentTypeSet()) { // replicate the commands setting the content-length for (Runnable cmd : contentLengthHeaderModifications) { cmd.run(); } } else { setSessionIDCookie(); setTraceCorrelationInformation(); } }