public static boolean checkIsValidH2WriteHeader(String headerName) {
        if (!headerName.startsWith(":")) {
            if ("Connection".equalsIgnoreCase(headerName)) {
                return false;
            }
            if ("TE".equalsIgnoreCase(headerName)) {
                return false;
            }
        }
        return true;
    }
public static boolean checkIsValidH2WriteHeader ( String headerName ) { if ( ! headerName . startsWith ( ":" ) ) { if ( "Connection" . equalsIgnoreCase ( headerName ) ) { return false ; } if ( "TE" . equalsIgnoreCase ( headerName ) ) { return false ; } } return true ; }
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