Closed Bug 204430 Opened 23 years ago Closed 23 years ago

DNS: local domain checking causes name-based virtual host addresses to fail

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 177919

People

(Reporter: bjdean, Assigned: darin.moz)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 By 'dns local domain checking' I mean configuration of a system such that it will automatically append a local domain to the end of a hostname lookup if it fails (so I can type in just short hostnames for local machines). The scenario is this - if a person enters something like http://www as the location the first DNS access will almost certainly fail. However if foo.org is listed as one of my local domains, the call to gethostbyname will then try www.foo.org, which then succeeds. The problem is this - at this stage Mozilla sends a request to whatever IP address resolved to www.foo.org, but the host header is "Host: www" which will fail if www.foo.org is a name-based virtual host (and it is not the default virtual host for that web server) Note that if mozilla is configured to send the request to a proxy cache this does not necessarily happen because the proxy handles the DNS request, not mozilla/the local workstation. Reproducible: Always Steps to Reproduce: 1.Configure workstation (ie *nix /etc/resolv.conf) to include a local domain, preferrable this local domain should include a web server at an address like www.foo.org (the local domain should be set to foo.org) 2.Turn off proxy caching in mozilla 3.Make an access to http://www/ Actual Results: DNS request fails of www and then is tried with local domain appended (which succeeds) - once this is done a request is sent to the web server with Host header: "Host: www" which is incorrect Expected Results: Mozilla should extract the hostname from the response from gethostbyname and compare it against the name requested, if a domain has been appended this should be determinable and mozilla should append this domain to the Host: header sent to th web server. Note - a web site authority may just be an alias for the actual web server (at which stage a CNAME record is the result of the DNS lookup) - in this case the domain of the alias, not the final 'real' web server address needs to be used. This problem appears to exist in other web clients but I have only really tested it with mozilla and cURL. (both mozilla and cURL show the same behaviour)
I have just heard back from one of my users that they have seen this problem on "various versions of IE and Mozilla" so it seems to be fairly across-the-board sort of behaviour.
I think it's a dupe of bug 177919 (see comment 5 and 7). Reporter, please reopen if you don't agree. *** This bug has been marked as a duplicate of 177919 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
VERIFIED/dupe: let's clarify though... we are complaining that the "Host:" line sent by mozilla is wrong.
Status: RESOLVED → VERIFIED
Summary: dns local domain checking causes name-based virtual host addresses to fail → DNS: local domain checking causes name-based virtual host addresses to fail
benc: Yes - mozilla will send the exact authority entered in the location field, despite this authority possibly being auto-completed wih a 'local' domain name by the call to gethostbyname.
You need to log in before you can comment on or make changes to this bug.