private static void maybeRemoveConnectionHeaders(io.netty.handler.codec.http.HttpHeaders inHeaders,
                                                     HttpHeadersBuilder out) {
        final CaseInsensitiveMap connectionDisallowedList =
                toLowercaseMap(inHeaders.valueCharSequenceIterator(HttpHeaderNames.CONNECTION), 8);
        final boolean isWebSocketUpgrade = isWebSocketUpgrade(inHeaders);
        connectionDisallowedList.forEach(entry -> out.remove(entry.getKey()));
        HTTP_TO_HTTP2_HEADER_DISALLOWED_LIST.forEach(entry -> out.remove(entry.getKey()));
        if (isWebSocketUpgrade) {
            out.set(HttpHeaderNames.CONNECTION, HttpHeaderValues.UPGRADE.toString());
            out.set(HttpHeaderNames.UPGRADE, HttpHeaderValues.WEBSOCKET.toString());
        }
    }
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