Skip to content
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

Merged
merged 7 commits into from
Oct 25, 2024
Merged

Conversation

NathanQingyangXu
Copy link
Contributor

@NathanQingyangXu NathanQingyangXu marked this pull request as ready for review October 7, 2024 20:23
@NathanQingyangXu NathanQingyangXu requested review from a team and rozza and removed request for a team October 7, 2024 20:23
@NathanQingyangXu NathanQingyangXu marked this pull request as draft October 7, 2024 21:17
@NathanQingyangXu NathanQingyangXu removed the request for review from rozza October 7, 2024 21:17
Copy link
Contributor

@katcharov katcharov left a 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.

Copy link
Contributor

@katcharov katcharov left a 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.
Copy link
Contributor

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.

@NathanQingyangXu NathanQingyangXu merged commit fa7908e into main Oct 25, 2024
59 checks passed
@NathanQingyangXu NathanQingyangXu deleted the JAVA-5542 branch October 25, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants