URI uri() {
        final String uri;
        final String path = path();
        if (isAbsoluteUri(path)) {
            uri = path;
        } else {
            final String scheme = scheme();
            checkState(scheme != null, ":scheme header does not exist.");
            final String authority = authority();

            try (TemporaryThreadLocals tmp = TemporaryThreadLocals.acquire()) {
                final StringBuilder sb = tmp.stringBuilder();
                sb.append(scheme);
                sb.append(':');
                if (authority != null) {
                    sb.append("//");
                    sb.append(authority);
                }
                sb.append(path);
                uri = sb.toString();
            }
        }

        try {
            return new URI(uri);
        } catch (URISyntaxException e) {
            throw new IllegalStateException("not a valid URI: " + uri, e);
        }
    }
Creates a deep copy of the specified {@link HttpHeaderGetters}.
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java