public static RequestHeaders toArmeria(
            ChannelHandlerContext ctx, HttpRequest in, RequestHeadersBuilder out,
            ServerConfig cfg, String scheme, RequestTarget reqTarget) throws URISyntaxException {

        final io.netty.handler.codec.http.HttpHeaders inHeaders = in.headers();
        out.method(firstNonNull(HttpMethod.tryParse(in.method().name()), HttpMethod.UNKNOWN))
           .scheme(scheme)
           .path(reqTarget.toString());

        if (!out.contains(HttpHeaderNames.HOST)) {
            out.add(HttpHeaderNames.HOST, defaultAuthority(ctx, cfg));
        }
        purgeHttp1OnlyHeaders(inHeaders, out);
        return out.build();
    }
Converts the headers of the given Netty HTTP/1.x request into Armeria HTTP/2 headers.
The following headers are only used if they can not be found in the {@code HOST} header or the
{@code Request-Line} as defined by <a href="https://datatracker.ietf.org/doc/rfc7230/">rfc7230</a>
<ul>
<li>{@link ExtensionHeaderNames#SCHEME}</li>
</ul>
{@link ExtensionHeaderNames#PATH} is ignored and instead extracted from the {@code Request-Line}.
core/src/main/java/com/linecorp/armeria/internal/common/ArmeriaHttpUtil.java