8 ms·
This might have something to do with the way that name resolution worked inside of Sun at the time. If there was a host, say doppio.eng.sun.com it would b
by smarks 7y ago
This might have something to do with the way that name resolution worked inside of Sun at the time. If there was a host, say
doppio.eng.sun.com
it would be referred to simply as "doppio" from within the engineering ("eng.sun.com") domain, or possibly as "doppio.eng" from other domains inside of Sun. It was fairly rare to use FQDNs inside of Sun to refer to other hosts inside of Sun. Thus, the following URLs all referred to the same resource:
http://doppio/foo.html
http://doppio.eng/foo.html
http://doppio.eng.sun.com/foo.html
It's a plausible point of view that URL.equals() should report true for any two of the above URLs. (That doesn't mean that I think it was a good idea, though.)
- cryptonector 7y agoBut then again, an HTTP server is allowed to provide different semantics for an URLs depending on the authority portion of those URLs. So, no, this is not remotely Ok at all.
- kelnos 7y agoAgreed, but consider that the internet, and state of HTTP hosting, was a very different place in 1995. Was the Host header even a thing back then? (And if it was, was it widely deployed?) This is clearly wrong in hindsight, but I could see why it was naively designed that way in the first place. Regardless, given all Java's warts, this doesn't even make my top 10.
- cryptonector 7y agoSure, but since no one in their right mind wants this behavior now, it's best to rip it out and fix the spec to not require it.