public static int findAuthority(String reqTarget) {
        final int firstColonIdx = reqTarget.indexOf(':');
        if (firstColonIdx <= 0 || reqTarget.length() <= firstColonIdx + 3) {
            return -1;
        }
        final int firstSlashIdx = reqTarget.indexOf('/');
        if (firstSlashIdx <= 0 || firstSlashIdx < firstColonIdx) {
            return -1;
        }

        if (reqTarget.charAt(firstColonIdx + 1) == '/' && reqTarget.charAt(firstColonIdx + 2) == '/') {
            return firstColonIdx + 3;
        }

        return -1;
    }
Returns the index of the authority part if the specified {@code reqTarget} is an absolute URI.
Returns {@code -1} otherwise.
core/src/main/java/com/linecorp/armeria/internal/common/ArmeriaHttpUtil.java