-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow valid SRV hostnames with less than 3 parts #1525
Conversation
63c5ffe
to
86b3b81
Compare
c3d2782
to
36811a2
Compare
36811a2
to
49ee4c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just a few comments/questions.
driver-core/src/main/com/mongodb/internal/dns/DefaultDnsResolver.java
Outdated
Show resolved
Hide resolved
driver-core/src/main/com/mongodb/internal/dns/DefaultDnsResolver.java
Outdated
Show resolved
Hide resolved
...core/src/test/unit/com/mongodb/internal/connection/InitialDnsSeedListDiscoveryProseTest.java
Outdated
Show resolved
Hide resolved
...core/src/test/unit/com/mongodb/internal/connection/InitialDnsSeedListDiscoveryProseTest.java
Outdated
Show resolved
Hide resolved
...core/src/test/unit/com/mongodb/internal/connection/InitialDnsSeedListDiscoveryProseTest.java
Show resolved
Hide resolved
…redundant code comment as per code review comment
…at 'resolvedHost' might not contain '.'
9535d5d
to
fb9feb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -64,13 +64,19 @@ public DefaultDnsResolver(@Nullable final DnsClient dnsClient) { | |||
|
|||
The priority and weight are ignored, and we just concatenate the host (after removing the ending '.') and port with a | |||
':' in between, as expected by ServerAddress. | |||
|
|||
It's required that the srvHost has at least three parts (e.g. foo.bar.baz) and that all of the resolved hosts have a parent | |||
domain equal to the domain of the srvHost. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional since this is internal, but consider replacing this with the revised conditions.
https://jira.mongodb.org/browse/JAVA-5542