code: public static boolean checkIsValidH2WriteHeader(String headerName) {
          if (!headerName.startsWith(":")) {
              if ("Connection".equalsIgnoreCase(headerName)) {
                  return false;
              }
              if ("TE".equalsIgnoreCase(headerName)) {
                  return false;
              }
          }
          return true;
      }
docs: Check to see if a given header name is valid to write on an HTTP/2 connection
  
  @param H2HeaderField
  @throws CompressionException if the H2HeaderField is not valid