Re:Java's URL.equals() Performs DNS Resolution
by cryptonector on Wednesday December 11, 2019 @08:29PM
(#21768550)
This is nonsense. The spec is wrong. There is no chance I would consider two URLs with equal local parts and query parameters, but different authorities resolving to the same addresses as equal -- that would be WRONG. The authority could easily provide different semantics for the same URL based on differing Host: values.
[ Parent
| on HN ]
Re:Java's URL.equals() Performs DNS Resolution
by romwell on Wednesday December 11, 2019 @08:58PM
(#21768682)
They know this is nonsense and that the spec is wrong.
It's there for backwards compatibility, which is not nonsense. It keeps the old code running.
Re:Java's URL.equals() Performs DNS Resolution
by cryptonector on Thursday December 12, 2019 @11:55AM
(#21773566)
Sometimes you need to break backwards compatibility for semantics. This is one of those cases.