private Map<String, Collection<String>> filterRestrictedHeaders(
      Map<String, Collection<String>> headers) {
    final Map<String, Collection<String>> filteredHeaders =
        headers.keySet().stream()
            .filter(headerName -> !DISALLOWED_HEADERS_SET.contains(headerName))
            .collect(Collectors.toMap(Function.identity(), headers::get));

    filteredHeaders.computeIfAbsent("Accept", key -> List.of("*/*"));

    return filteredHeaders;
  }
There is a bunch o headers that the http2 client do not allow to be set.

@see jdk.internal.net.http.common.Utils.DISALLOWED_HEADERS_SET
java11/src/main/java/feign/http2client/Http2Client.java