public static RequestHeaders toArmeriaRequestHeaders(ChannelHandlerContext ctx, Http2Headers headers,
                                                         boolean endOfStream, String scheme,
                                                         ServerConfig cfg,
                                                         RequestTarget reqTarget) {
        assert headers instanceof ArmeriaHttp2Headers;
        final HttpHeadersBuilder builder = ((ArmeriaHttp2Headers) headers).delegate();
        builder.endOfStream(endOfStream);
        if (!builder.contains(HttpHeaderNames.CONTENT_LENGTH)) {
            // `isContentLengthUnknown` is set to true so as not to automatically fill the content-length when
            // the HTTP objects are aggregated.
            builder.contentLengthUnknown();
        }
        // A CONNECT request might not have ":scheme". See https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.3
        if (!builder.contains(HttpHeaderNames.SCHEME)) {
            builder.add(HttpHeaderNames.SCHEME, scheme);
        }
        if (builder.get(HttpHeaderNames.AUTHORITY) == null && builder.get(HttpHeaderNames.HOST) == null) {
            builder.add(HttpHeaderNames.AUTHORITY, defaultAuthority(ctx, cfg));
        }
        builder.set(HttpHeaderNames.PATH, reqTarget.toString());
        final List<String> cookies = builder.getAll(HttpHeaderNames.COOKIE);
        if (cookies.size() > 1) {
            // Cookies must be concatenated into a single octet string.
            // https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.5
            builder.set(HttpHeaderNames.COOKIE, COOKIE_JOINER.join(cookies));
        }
        return RequestHeaders.of(builder.build());
    }
Converts the specified Netty HTTP/2 into Armeria HTTP/2 {@link RequestHeaders}.
core/src/main/java/com/linecorp/armeria/internal/common/ArmeriaHttpUtil.java