File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
main/java/io/grpc/internal
test/java/io/grpc/internal Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 3333 * A provider for {@link DnsNameResolver}.
3434 *
3535 * <p>It resolves a target URI whose scheme is {@code "dns"}. The (optional) authority of the target
36- * URI is reserved for the address of alternative DNS server (not implemented yet). The first path
37- * segment of the hierarchical target URI is interpreted as an RFC 2396 "server-based" authority and
38- * used as the "service authority" of the resulting {@link NameResolver}. The "host" part of this
39- * authority is the name to be resolved by DNS. The "port" part of this authority (if present) will
40- * become the port number for all {@link InetSocketAddress} produced by this resolver. For example:
36+ * URI is reserved for the address of alternative DNS server (not implemented yet). The target URI
37+ * must be hierarchical and have exactly one path segment which will be interpreted as an RFC 2396
38+ * "server-based" authority and used as the "service authority" of the resulting {@link
39+ * NameResolver}. The "host" part of this authority is the name to be resolved by DNS. The "port"
40+ * part of this authority (if present) will become the port number for all {@link InetSocketAddress}
41+ * produced by this resolver. For example:
4142 *
4243 * <ul>
4344 * <li>{@code "dns:///foo.googleapis.com:8080"} (using default DNS)</li>
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ public void newNameResolver_validDnsNameWithoutPort_usesDefaultPort() {
103103 assertThat (nameResolver .getPort ()).isEqualTo (args .getDefaultPort ());
104104 }
105105
106+ // TODO(jdcormie): Trailing path segments *should* be forbidden. This test just demonstrates that
107+ // both newNameResolver() overloads behave the same with respect to this bug.
106108 @ Test
107109 public void newNameResolver_toleratesTrailingPathSegments () {
108110 NameResolver nameResolver = newNameResolver ("dns:///foo.googleapis.com/ig/nor/ed" , args );
You can’t perform that action at this time.
0 commit comments