4 ms·
What about http://foo/ http://foo/ and http://foo:80/ http://foo:80/? Are those different URLs?
by boring_twenties 7y ago
What about http://foo/ http://foo/ and http://foo:80/ http://foo:80/? Are those different URLs?
- beart 7y agoYes, they just resolve to the same thing
- iso-8859-1 7y agoPort numbers do not resolve. And your 'thing' is ambiguous.
- spc476 7y agoRFC-3986, section 6.2.3: For example, because the "http" scheme makes use of an authority component, has a default port of "80", and defines an empty path to be equivalent to "/", the following four URIs are equivalent: http://example.com http://example.com/ http://example.com:/ http://example.com:80/
- patrickthebold 7y ago> January 2005
- spc476 7y agoAnd? It has not been obsoleted, and it's marked as STD0066.
- kelnos 7y agoOne thing I find interesting is that it doesn't canonicalize the path portion at all. E.g.: scala> new URL("http://localhost/foo/bar/baz").equals(new URL("http://localhost/foo/../foo/bar/baz")) res0: Boolean = false It's just funny to me that they went to the effort to do a full network request to see if the hostnames resolve to the same IP, but didn't bother to normalize paths.
- boring_twenties 7y agoWow, so it's even stupider than we thought. Impressive.