Closed Bug 196852 Opened 21 years ago Closed 21 years ago

URLs starting with hyphen ( - ) not resolved

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: jussi.laukkanen, Assigned: dougt)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130

Mozilla won't resolve URL starting with hyphen (minus).
http://-etcetera-.city.fi is the only URL that I know which starts with this and
when entering this into address bar (or clicking link) Mozilla can't resolve it,
saying "-etcetera-.city.fi could not be found. Please check the name.." However
this address exists in the DNS:
-
Name:   -etcetera-.city.fi
Address: 213.157.66.220
-

The domain city.fi provides (to my knowledge) this kind of URL:s to its users,
virtual servers pointing to their home dirs. The link works with Internet
Explorer (6.0 I think, whatever comes with WinXP) but not in Konqueror (3.0.3).

I'm using Mozilla 1.2.1 (and Konqueror) with RedHat Linux 7.3.

Reproducible: Always

Steps to Reproduce:
1. Enter the URL http://-etcetera-.city.fi
2.
3.

Actual Results:  
Mozilla can't resolve the address, saying "-etcetera-.city.fi could not be
found. Please check the name and try again"

Expected Results:  
Mozilla should have resolved the address and loaded the page.

Using theme Pinball, happens with default theme too.
wfm using build 2003031008 (trunk) on Win2k.
Try again with 1.3 release candidate:
http://www.mozillazine.org/weblogs/asa/archives/002632.html
WFM Mozilla 2003022308 Win NT4

Note: I tipped "-etcetera-.city.fi" into the location bar and pressed enter. The
pref "browser.fixup.alternate.enabled" is set to false. And I use a proxy (so
DNS is done by the proxy server).


Tried Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030310, bug is
still there. I don't use proxy.
Day old trunk CVS, Linux:
Getting the alert here too - the URL does not resolve.
I don't "wittingly" use a proxy, but my ISP use a "transparent" one.
The situation is pretty simple...

1)  Leading '-' is not allowed in hostnames
2)  The Win32 system resolver attempts to look up such hostnames anyway, in
    violation of the DNS spec, as far as I can tell.
3)  The Linux system resolver does not suffer from this bug.

So this works in Mozilla/Windows and fails in Mozilla/Linux and will continue to
fail until either:

a) We stop using the OS to resolve hostnames (not happening)
b) The Linux resolver is broken to match the Win32 resolver (not likely)
c) This site stops violating the DNS spec (your guess is as good as mine)

Reporter, I suggest contacting the site and requesting that they stop using
illegal hostnames that can't be accessed by a wide range of client software.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Just three items of note for the record:

[1] Without trying to stur up trouble it should be stated that I have no trouble
resolving the host name on my OS X box just fine  - via any app i try (from
nslookup to curl to a Moz 1.3RC build)

[2] http://etcetera.city.fi/ is resolving to the same IP and serving the same
content as http://-etcetera-.city.fi/ ... can't say if this is by design of the
DNS system or by design of the host and controller of this particular domain name.

[3] Because of my experience in 1 I had to lookup the RFC for myself and indeed
the given domain is illegal. See RFC 952, http://www.rfc-editor.org/rfc/rfc952.txt
"ASSUMPTIONS

   1. A "name" (Net, Host, Gateway, or Domain name) is a text string up
   to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
   sign (-), and period (.).  Note that periods are only allowed when
   they serve to delimit components of "domain style names". (See
   RFC-921, "Domain Name System Implementation Schedule", for
   background).  No blank or space characters are permitted as part of a
   name. No distinction is made between upper and lower case.  The first
   character must be an alpha character.  The last character must not be
   a minus sign or period.  [...]"
VERIFIED, invalid:
Another case for bug 140379.
Status: RESOLVED → VERIFIED
*** Bug 307859 has been marked as a duplicate of this bug. ***
*** Bug 326264 has been marked as a duplicate of this bug. ***
*** Bug 346547 has been marked as a duplicate of this bug. ***
*** Bug 351121 has been marked as a duplicate of this bug. ***
*** Bug 362978 has been marked as a duplicate of this bug. ***
Correction to comment #15.

See bug 441764: request that it tell users why it fails.
You need to log in before you can comment on or make changes to this bug.