This version fixes a bug with https:
URLs defaulting to port 80
instead of 443
when no port is specified. Thanks to @dskvr for reporting
This bug affects comparing URLs with the default HTTPs port to URLs without it. For example, comparing https://example.com/
to https://example.com:443/
or vice versa.
They should be treated as equivalent but weren't due to the incorrect port being used. The bug does not affect comparing URLs without the default port to other URLs without it.