Closed Bug 1664448 Opened 5 years ago Closed 4 years ago

Localhost subdomains don't work if the DNS resolver only returns an ipv4

Categories

(Core :: Networking: DNS, defect)

80 Branch
x86_64
Windows 10
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: mozilla.bugzilla, Unassigned)

Details

Attachments

(1 file)

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.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Networking: DNS
Product: Firefox → Core
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64

Could you try to get the http log?
Thanks.

Flags: needinfo?(mozilla.bugzilla)

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.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Flags: needinfo?(mozilla.bugzilla)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: