private void generateContentLength(final HttpResponse response, final byte[] body) {
        response.removeHeaders(HttpHeaders.TRANSFER_ENCODING);
        response.setHeader(HttpHeaders.CONTENT_LENGTH, Integer.toString(body.length));
    }
Generate a 304 - Not Modified response from the {@link HttpCacheEntry}. This should be
used to respond to conditional requests, when the entry exists or has been re-validated.
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachedHttpResponseGenerator.java