private static void maybeSetTransferEncoding(HttpMessage out, int statusCode) {
        final io.netty.handler.codec.http.HttpHeaders outHeaders = out.headers();
        if (HttpStatus.isContentAlwaysEmpty(statusCode)) {
            maybeRemoveContentLength(statusCode, outHeaders);
        } else {
            final long contentLength = HttpUtil.getContentLength(out, -1L);
            if (contentLength < 0) {
                // Use chunked encoding.
                outHeaders.set(HttpHeaderNames.TRANSFER_ENCODING, HttpHeaderValues.CHUNKED);
                outHeaders.remove(HttpHeaderNames.CONTENT_LENGTH);
            }
        }
    }
The ID of the last request whose response headers is written.
core/src/main/java/com/linecorp/armeria/server/ServerHttp1ObjectEncoder.java