Localhost subdomains don't work if the DNS resolver only returns an ipv4
Categories
(Core :: Networking: DNS, defect)
Tracking
()
People
(Reporter: mozilla.bugzilla, Unassigned)
Details
Attachments
(1 file)
113.32 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0
Steps to reproduce:
When doing local development, Firefox refuses to load localhost subdomains if the DNS resolver only returns an ipv4.
E.g. when I try to access http://dev.localhost, which I've configured in my hosts file to point to 127.0.0.1, FF presents the "Unable to connect" page. However the DNS lookup tool does find the ipv4 address at about:networking#dnslookuptool
When I then add the ipv6 address as well to the hosts file (::1), FF does open de website. (although both ipv4 and ipv6 are in the hosts file only ipv6 resolves on windows when both are present)
This occurred on my Windows 10 (v2004) machine on FF 80.0.1, the website was served by Apache running in WSL (ubuntu 20.04, wsl 2).
This didn't occur on my Linux Mint machine (19.3) on FF 80.0, however the dns resolver there served both the ipv4 and ipv6 on all *.localhost domains. Thus I blame the dns handling in FF that unnecessarily requires ipv6 for localhost.
Actual results:
FF doesn't load localhost subdomains with only an ipv4 reference.
Expected results:
FF should load localhost subdomains with only an ipv4 reference.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Could you try to get the http log?
Thanks.
Sorry forgot about this issue.
Tried reproducing it now, but can't reproduce it anymore.
Any *.localhost I enter (irrelevant of my hosts file) now resolves to 127.0.0.1 + ::1.
Maybe Windows changed something, or it was fixed in any of the later FF versions.
I don't think this issue is relevant anymore.
Description
•