W3C home > Mailing lists > Public > www-amaya@w3.org > July to September 2002

Re: URI base resolution and Content-Location

From: Yves Lafon <ylafon@w3.org>
Date: Thu, 12 Sep 2002 15:18:16 +0200 (MET DST)
To: Jose Kahan <jose.kahan@w3.org>
cc: www-amaya@w3.org
Message-ID: <Pine.GSO.4.44.0209121511060.28651-100000@tarantula.inria.fr>

On Thu, 12 Sep 2002, Jose Kahan wrote:

> Yves,
>
> This sounds quite problematic. I understand using Content-Location for
> solving Content-Negotiation problems when publishing. However, using it
> as a Base URI is akin to making an unexplicit redirection. This
> sounds problematic for an editor, and even when following links.

Content-Location is indicating where the real resource is. In the case I
described, you have http://www.example.com/news.html that have the
semantic of "latest URI" and
http://www.example.com/archives/2002/09/09/news.html have the semantic of
"news of 9/9/2002", so it is not about solving conneg issues, it's a
matter of semantic of URI.
Regarding Base URI resolving, RFC2616 has authority on this and say that
the Base URI is the one given in the Content-Location. If it is relative,
it is then computed from the request URI and this relative URI.

> In the case of an editor, which URL should you use then when making
> a link? The one given in the Content-Location? If you do so, then you
> may break Content-Negotiation (e.g., linking to image.svg intead of
> image, if image exists in many formats).

When you create a link, you are already in the document, unless you want
to edit and follow links from the linked doc, you don't even have to
compute the real URI for it. But if you are creating a relative link, then
yes you should compute it according to the base URI (it can be displayed
in the "add link" box, to tell the user that it is not the same as the URI
displayed in the location box).

> When following links, you would then follow them relative to the
> Content-Location. For example, if open a document at www.example.org
> that has a content location value of www.w3.org/, then the
> next relative URL you'd browse from there would be taken directly from
> www.w3.org and that's the URL we would show in the address field, just
> like with a redirection. This sounds confusing.

Well, it is not confusing, links are opaque, so linking to the new site
directly won't make any difference for the user.

> If the server is able to add a Content-Location header that points
> elsewhere than where the document actually is, it may be as easy to
> make a redirection to the actual location of the document.

No, a redirection does have the same semantic! See the example above for
an example of why Content-Location may be semantically important.
Thanks,

-- 
Yves Lafon - W3C
"Baroula que barouleras, au tiéu toujou t'entourneras."
Received on Thursday, 12 September 2002 09:18:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:26 UTC