When are and aren't two URLs the same? (ports)

Martin Atkins mart at degeneration.co.uk
Fri Apr 14 08:02:07 UTC 2006

Johannes Ernst wrote:
> Do these URLs:
>     http://example.com/joe
>     http://example.com:80/joe
> represent the same identity?
> A version of this discussion took place on this list before, I  believe,
> and people generally didn't want to get into it. However, at  a minimum,
> we need to say "no URL transformation of any kind shall be  permitted"
> if that is what we decide.

I seem to remember that this was the closest we got to a conclusion in
the previous discussion.

The only safe answer is to say that the URL is to be used verbatim with
no transformation at all. This does, of course, exclude the rules for
producing a full URL out of, say, frank.livejournal.com.

The user is unlikely to try to break the system by entering a port
number in some places but not others, so that just leaves broken
consumer implementations that insert that :80 where it doesn't belong,
which I assume is what is happening in your case.

In my opinion, the spec should simply state that consumers aren't
allowed to "guess" whether two URLs are equivilent unless they are
byte-for-byte equivilent. This is also the approach taken with XML
namespaces, I believe.

More information about the yadis mailing list