Skip to content

[System.Net.NameResolution] Fall back to localhost when localhost. resolution fails#130504

Merged
rzikm merged 1 commit into
dotnet:mainfrom
liveans:liveans-fix-localhost-dot-fallback
Jul 13, 2026
Merged

[System.Net.NameResolution] Fall back to localhost when localhost. resolution fails#130504
rzikm merged 1 commit into
dotnet:mainfrom
liveans:liveans-fix-localhost-dot-fallback

Conversation

@liveans

@liveans liveans commented Jul 10, 2026

Copy link
Copy Markdown
Member

Note

This pull request was prepared with assistance from GitHub Copilot.

Summary

Some OS resolvers fail to resolve the fully qualified localhost. name even though it is equivalent to localhost.

This change makes localhost. eligible for the existing RFC 6761 fallback behavior:

  • Try resolving the original name through the OS first.
  • Fall back to plain localhost if resolution fails or returns no addresses.
  • Preserve the existing localhost subdomain behavior.

Fixes #129204

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 10, 2026 16:59
@liveans

liveans commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@rzikm rzikm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@rzikm

rzikm commented Jul 13, 2026

Copy link
Copy Markdown
Member

/ba-g pipeline timeouts are unrelated

@rzikm rzikm merged commit c41ce9b into dotnet:main Jul 13, 2026
84 of 91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants