code: public static Http2Headers toNettyHttp2(HttpHeaders in, boolean server) {
          final Http2Headers out = new DefaultHttp2Headers(false, in.size());
  
          // Trailing headers if it does not have :status.
          if (server && in.status() == null) {
              for (Entry<AsciiString, String> entry : in) {
                  final AsciiString name = entry.getKey();
                  final String value = entry.getValue();
                  if (name.isEmpty() || HTTP_TRAILER_BLACKLIST.contains(name)) {
                      continue;
                  }
                  out.add(name, value);
              }
          } else {
              out.set(in);
              out.remove(HttpHeaderNames.CONNECTION);
              out.remove(HttpHeaderNames.TRANSFER_ENCODING);
          }
  
          if (!out.contains(HttpHeaderNames.COOKIE)) {
              return out;
          }
  
          // Split up cookies to allow for better compression.
          // https://tools.ietf.org/html/rfc7540#section-8.1.2.5
          final List<CharSequence> cookies = out.getAllAndRemove(HttpHeaderNames.COOKIE);
          for (CharSequence c : cookies) {
              out.add(HttpHeaderNames.COOKIE, COOKIE_SPLITTER.split(c));
          }
  
          return out;
      }
docs: Converts the specified Armeria HTTP/2 headers into Netty HTTP/2 headers.