GeezerVison is showing github.com — Resolving localhost subdomains · Issue #16744 · netty/netty
Resolving localhost subdomains #16744
Description
When you try to resolve a domain within localhost (e.g. example.localhost) netty currently queries checks the hosts file and queries the DNS server if it isn't defined there. If the DNS server does not resolve the record then netty throws an unknown host exception. This was tested on MacOS with Netty 4.2.12.Final.
The correct behaviour is defined in RFC 6761 Section 6.3:
Name resolution APIs and libraries SHOULD recognize localhost
names as special and SHOULD always return the IP loopback address
for address queries and negative responses for all other query
types. Name resolution APIs SHOULD NOT send queries for
localhost names to their configured caching DNS server(s).
There already is an exception for resolving localhost specifically on Windows because it isn't in the hosts file (see #5410). Expanding that to apply to all subdomains of localhost on all systems would solve this issue.
Activity
normanmaurer commented on May 5, 2026
Reacted by Julian Vennen and its-me20
added a commit that references this issue
on May 18, 2026This issue will close once commit a6aeb6d is merged into the '4.2' branch.a6aeb6d added 2 commits that reference this issue
on May 18, 2026This issue will close once commit df9f928 is merged into the '4.2' branch.df9f928 This issue will close once commit bb458bd is merged into the '4.2' branch.bb458bd
Metadata
Metadata
Development
No branches or pull requestsIssue actions