private static String removeIpv6ScopeId(String ipV6Authority) {
        final int percentPos = ipV6Authority.indexOf('%');
        if (percentPos == -1) {
            return ipV6Authority;
        }

        final int endBracket = ipV6Authority.indexOf(']');
        // An incomplete IPv6 address is rejected by URI constructor.
        assert endBracket > 0 : "endBracket: " + endBracket + " (expected: > 0)";
        return ipV6Authority.substring(0, percentPos) + ipV6Authority.substring(endBracket);
    }
Attempts to parse this URI's authority component and return {@link SchemeAndAuthority}.
The authority part may have one of the following formats (The userinfo part will be ignored.):
<ul>
  <li>{@code "unix$3A<socket file>"} for a domain socket authority </li>
  <li>{@code "<host>:<port>"} for a host endpoint </li>
  <li>{@code "<host>"}, {@code "<host>:"} for a host endpoint with no port number specified</li>
</ul>
An IPv4 or IPv6 address can be specified in lieu of a host name, e.g. {@code "127.0.0.1:8080"} and
{@code "[::1]:8080"}.

@throws IllegalArgumentException if {@code scheme} or {@code authority} do not comply with RFC 2396
core/src/main/java/com/linecorp/armeria/internal/common/SchemeAndAuthority.java