src/main/java/com/linecorp/armeria/server/VirtualHost.java
/**
     * IDNA ASCII conversion, case normalization and validation.
     */
IDNA ASCII conversion, case normalization and validation.
IDNA ASCII conversion case normalization and validation .
static String normalizeHostnamePattern(String hostnamePattern) {
        requireNonNull(hostnamePattern, "hostnamePattern");
        if (needsNormalization(hostnamePattern)) {
            hostnamePattern = IDN.toASCII(hostnamePattern, IDN.ALLOW_UNASSIGNED);
        }
        if (!"*".equals(hostnamePattern) &&
            !HOSTNAME_PATTERN.matcher(hostnamePattern.startsWith("*.") ? hostnamePattern.substring(2)
                                                                       : hostnamePattern).matches()) {
            throw new IllegalArgumentException("hostnamePattern: " + hostnamePattern);
        }
        return hostnamePattern.toLowerCase(Locale.ENGLISH);
    }
static String normalizeHostnamePattern ( String hostnamePattern ) { requireNonNull ( hostnamePattern , "hostnamePattern" ) ; if ( needsNormalization ( hostnamePattern ) ) { hostnamePattern = IDN . toASCII ( hostnamePattern , IDN . ALLOW_UNASSIGNED ) ; } if ( ! "*" . equals ( hostnamePattern ) && ! HOSTNAME_PATTERN . matcher ( hostnamePattern . startsWith ( "*." ) ? hostnamePattern . substring ( 2 ) : hostnamePattern ) . matches ( ) ) { throw new IllegalArgumentException ( "hostnamePattern: " + hostnamePattern ) ; } return hostnamePattern . toLowerCase ( Locale . ENGLISH ) ; }
IDNA ASCII conversion, case normalization and validation.
IDNA ASCII conversion case normalization and validation .