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

Fix querying absolute domain name twice #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rhenium
Copy link
Member

@rhenium rhenium commented Mar 26, 2021

When search list is not explicitly specified, Resolv::DNS checks the local domain name of the running system. If it is not set either, the root domain ['.'] is used.

This is conceptually correct, but the code handles the absolute name separately, which in turn creates a duplicate query.

rhenium added 3 commits March 26, 2021 18:12
Add more assertions to actually test that the ndots option is working
as expected: the option controls the threshold that the search list
should be attempted earlier or later.
When search list is not explicitly specified, Resolv::DNS checks the
local domain name of the running system. If it is not set either, the
root domain ['.'] is used.

This is conceptually correct, but the code handles the absolute name
separately, which in turn creates a duplicate query.
The current code works, but the intention was not clear at first glance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant