private static void maybeSetTeHeader(io.netty.handler.codec.http.HttpHeaders inHeaders,
                                         HttpHeadersBuilder out) {
        if (!inHeaders.contains(HttpHeaderNames.TE)) {
            return;
        }
        // https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.2 makes a special exception for TE
        final boolean hasTrailersTe = findDelimitedIgnoreCase(HttpHeaderNames.TE, HttpHeaderValues.TRAILERS,
                                                              inHeaders);
        if (hasTrailersTe) {
            out.set(HttpHeaderNames.TE, HttpHeaderValues.TRAILERS.toString());
        } else {
            out.remove(HttpHeaderNames.TE);
        }
    }
Removes HTTP/1 specified headers from a mutable headers map.
Functionally this method is expected to behave the same as
{@link #toArmeria(io.netty.handler.codec.http.HttpHeaders, HttpHeadersBuilder)}.
This method should be preferred going forward as we continue implementing zero-copy
for HTTP1 en/decoders.
core/src/main/java/com/linecorp/armeria/internal/common/ArmeriaHttpUtil.java