public static <T> void toHttp1Headers(HttpHeaders armeriaHeaders, T output,
                                          TriConsumer<T, AsciiString, String> writer) {
        for (Entry<AsciiString, String> e : armeriaHeaders) {
            final AsciiString k = e.getKey();
            final String v = e.getValue();
            if (k.charAt(0) != ':') {
                writer.accept(output, k, v);
            } else if (HttpHeaderNames.AUTHORITY.equals(k) && !armeriaHeaders.contains(HttpHeaderNames.HOST)) {
                // Convert `:authority` to `host`.
                writer.accept(output, HttpHeaderNames.HOST, v);
            }
        }
    }
Copies header value pairs of the specified {@linkplain HttpHeaders Armeria headers} to the
{@link TriConsumer} excluding HTTP/2 pseudo headers that starts with ':'. This also converts
{@link HttpHeaderNames#AUTHORITY} header to {@link HttpHeaderNames#HOST} header if
the {@linkplain HttpHeaders Armeria headers} does not have one.
core/src/main/java/com/linecorp/armeria/internal/common/ArmeriaHttpUtil.java