public static String convertHeaderValue(AsciiString name, CharSequence value) {
        if (!(value instanceof AsciiString)) {
            return value.toString();
        }
        if (HEADER_VALUE_CACHE != null && CACHED_HEADERS.contains(name)) {
            final String converted = HEADER_VALUE_CACHE.get((AsciiString) value);
            assert converted != null; // loader does not return null.
            return converted;
        }
        return value.toString();
    }
Returns a {@link ResponseHeaders} whose {@link HttpHeaderNames#CONTENT_LENGTH} is added or removed
according to the status of the specified {@code headers}, {@code content} and {@code trailers}.
The {@link HttpHeaderNames#CONTENT_LENGTH} is removed when:
<ul>
  <li>the status of the specified {@code headers} is one of {@link HttpStatus#NO_CONTENT},
      {@link HttpStatus#RESET_CONTENT} or {@link HttpStatus#NOT_MODIFIED}</li>
  <li>the trailers exists</li>
</ul>
The {@link HttpHeaderNames#CONTENT_LENGTH} is added when the state of the specified {@code headers}
does not meet the conditions above and {@link HttpHeaderNames#CONTENT_LENGTH} is not present
regardless of the fact that the content is empty or not.

<p>{@link ResponseHeaders#isEndOfStream()} is set to {@code true} if both {@link HttpData} and trailers
are empty.

@throws IllegalArgumentException if the specified {@code content} is not empty when the specified
                                 {@link HttpStatus} is one of {@link HttpStatus#NO_CONTENT},
                                 {@link HttpStatus#RESET_CONTENT} and {@link HttpStatus#NOT_MODIFIED}.
core/src/main/java/com/linecorp/armeria/internal/common/ArmeriaHttpUtil.java